Skip to content

Commit

Permalink
feat(QAWTO-194): test report using test reporter action
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardogarfe committed Jun 5, 2024
1 parent 4c29d2a commit 56bf377
Showing 1 changed file with 13 additions and 33 deletions.
46 changes: 13 additions & 33 deletions .github/workflows/playwright-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,38 +37,18 @@ jobs:
- name: Playwright test with pytest
run: |
cd web_playwright
python -m pytest tests/test_web_playwright_pytest.py --junitxml="test-result-pytest.xml"
python -m pytest tests/test_web_playwright_library_sync.py --junitxml="test-result-sync.xml"
python -m pytest tests/test_web_playwright_library_async.py --junitxml="test-result-async.xml"
- name: Upload Playwright Test Results
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()
uses: actions/upload-artifact@v4
continue-on-error: true
with:
name: playwright-tests-results-python-${{ matrix.python-version }}
path: web_playwright/test-result*.xml
retention-days: 7

publish-playwright-test-results:
name: "Publish Playwright Tests Results"
needs: build-and-test
runs-on: ubuntu-latest
if: success() || failure()
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- name: Download Playwright test Artifacts
uses: actions/download-artifact@v4
with:
name: playwright-tests-results-python-${{ matrix.python-version }}
path: playwright-tests-results-python-${{ matrix.python-version }}

- name: Publish Playwright Test Results ${{ matrix.python-version }}
uses: EnricoMi/publish-unit-test-result-action@v2
with:
files: |
playwright-tests-results-python-${{ matrix.python-version }}/**/*.xml
comment_title: "Playwright Tests Results Python ${{ matrix.python-version }}"
name: "Playwright tests with Python ${{ matrix.python-version }} version"
path: |
web_playwright/test-result-pytest-${{ matrix.python-version }}.xml
web_playwright/test-result-sync-${{ matrix.python-version }}.xml
web_playwright/test-result-async-${{ matrix.python-version }}.xml
reporter: java-junit
fail-on-error: 'true'
fail-on-empty: 'false'

0 comments on commit 56bf377

Please sign in to comment.