mirror of
https://github.com/qurator-spk/dinglehopper.git
synced 2025-06-09 20:00:01 +02:00
Add report_tests workflow
This commit is contained in:
parent
4bf123de43
commit
bf47308c00
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:
|
||||
|
||||
|
@ -29,9 +29,6 @@ jobs:
|
|||
|
||||
runs-on: "ubuntu-latest"
|
||||
|
||||
env:
|
||||
test_results_dir: test-results-${{ matrix.python-version }}
|
||||
|
||||
steps:
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
|
@ -52,19 +49,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