feat(QAWTO-194): test report update configuration #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Build and run Playwright tests | |
on: | |
push: | |
branches: | |
- master | |
- QAWTO-194/feat/enable-playwright-tests-in-actions | |
pull_request: | |
branches: master | |
jobs: | |
build-and-test: | |
name: Build and Test (Python ${{ matrix.python-version }}) | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Install playwright browsers | |
run: | | |
playwright install | |
- name: Playwright test with pytest | |
run: | | |
cd web_playwright | |
python -m pytest tests/test_web_playwright_pytest.py --junitxml="test-result-pytest-${{ matrix.python-version }}.xml" | |
python -m pytest tests/test_web_playwright_library_sync.py --junitxml="test-result-sync-${{ matrix.python-version }}.xml" | |
python -m pytest tests/test_web_playwright_library_async.py --junitxml="test-result-async-${{ matrix.python-version }}.xml" | |
- name: Test Reporter for pyhton ${{ matrix.python-version }} | |
uses: dorny/test-reporter@v1 | |
if: always() | |
with: | |
name: "Playwright tests with Python ${{ matrix.python-version }} version" | |
path: web_playwright/test-result-*-${{ matrix.python-version }}.xml | |
reporter: java-junit | |
fail-on-error: true | |
fail-on-empty: false |