mirror of
https://github.com/qurator-spk/dinglehopper.git
synced 2025-06-09 11:50:00 +02:00
Add report_tests workflow
This commit is contained in:
parent
296a820990
commit
308165b7eb
2 changed files with 24 additions and 16 deletions
20
.github/workflows/test.yml
vendored
20
.github/workflows/test.yml
vendored
|
@ -1,4 +1,4 @@
|
|||
name: test
|
||||
name: Test
|
||||
|
||||
on:
|
||||
|
||||
|
@ -30,9 +30,6 @@ jobs:
|
|||
# For Python 3.6, we need to fall back to Ubuntu 20.04
|
||||
runs-on: ${{ matrix.python-version == '3.6' && 'ubuntu-20.04' || 'ubuntu-latest' }}
|
||||
|
||||
env:
|
||||
test_results_dir: test-results-${{ matrix.python-version }}
|
||||
|
||||
steps:
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
|
@ -58,19 +55,10 @@ jobs:
|
|||
- name: Test
|
||||
run: |
|
||||
cd src
|
||||
mkdir -p ../$test_results_dir
|
||||
python3 -m pytest --junitxml=../$test_results_dir/junit.xml -o junit_family=legacy
|
||||
python3 -m pytest --junitxml=../junit.xml -o junit_family=legacy
|
||||
- name: Upload test results
|
||||
uses: actions/upload-artifact@v3
|
||||
if: success() || failure()
|
||||
with:
|
||||
name: ${{ env.test_results_dir }}
|
||||
path: ${{ env.test_results_dir }}
|
||||
|
||||
- name: Report tests
|
||||
uses: dorny/test-reporter@v1
|
||||
if: success() || failure()
|
||||
with:
|
||||
name: Results on Python ${{ matrix.python-version }}
|
||||
path: "${{env.test_results_dir }}/junit.xml"
|
||||
reporter: java-junit
|
||||
name: test-results-${{matrix.python-version}}
|
||||
path: junit.xml
|
||||
|
|
20
.github/workflows/test_report.yml
vendored
Normal file
20
.github/workflows/test_report.yml
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
name: 'Test Report'
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ['test']
|
||||
types:
|
||||
- completed
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
checks: write
|
||||
jobs:
|
||||
report:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: dorny/test-reporter@v1
|
||||
with:
|
||||
artifact: /test-results-.*/
|
||||
name: Tests Results
|
||||
path: 'junit.xml'
|
||||
reporter: jest-junit
|
Loading…
Add table
Add a link
Reference in a new issue