Skip to content

Commit

Permalink
Merge pull request #32 from mreiche/feature/junit-test-results
Browse files Browse the repository at this point in the history
Add support for test results
  • Loading branch information
mreiche authored Aug 4, 2024
2 parents 7144129 + c8c3420 commit c8bcc46
Showing 1 changed file with 14 additions and 24 deletions.
38 changes: 14 additions & 24 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ on:

permissions:
contents: read
checks: write
pull-requests: write

jobs:
run-tests:
Expand All @@ -31,27 +33,15 @@ jobs:

steps:
- uses: actions/checkout@v3
# - name: Set up Python 3.10
# uses: actions/setup-python@v3
# with:
# python-version: "3.10"
# - name: Install dependencies
# run: |
# pip install -r requirements.txt
# - name: List chromedriver
# run: |
# ls -lahF
# /home/chromedriver --version
# - name: Lint with flake8
# run: |
# # stop the build if there are Python syntax errors or undefined names
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
env:
PAF_TEST_HEADLESS: 1
PAF_TEST_CONTAINER: 1
PAF_TEST_LOCAL_SELENIUM: 0
PAF_BROWSER_SETTING: chrome:113
run: |
java -jar /home/selenium-server.jar standalone --host 127.0.0.1 &
PAF_TEST_HEADLESS=1 PAF_TEST_CONTAINER=1 PAF_TEST_LOCAL_SELENIUM=0 PAF_BROWSER_SETTING=chrome:113 pytest --cov=paf -n=4 test
pytest --cov=paf -n=4 --junitxml=test-results/tests.xml test
- name: Generate coverage report
run: coverage xml
- name: Upload coverage to Codecov
Expand All @@ -61,9 +51,9 @@ jobs:
fail_ci_if_error: true
files: ./coverage.xml
verbose: true
# - name: Publish Test Results
# uses: EnricoMi/publish-unit-test-result-action@v2
# if: always()
# with:
# files: |
# test-results/**/*.xml
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: |
test-results/**/*.xml

0 comments on commit c8bcc46

Please sign in to comment.