mirror of
https://github.com/qurator-spk/dinglehopper.git
synced 2025-06-09 20:00:01 +02:00
🚧 GitHub Actions: Test on multiple Python versions
This commit is contained in:
parent
f909806f9e
commit
6b05290640
1 changed files with 19 additions and 6 deletions
25
.github/workflows/test.yml
vendored
25
.github/workflows/test.yml
vendored
|
@ -11,7 +11,20 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
python-version: [ "3.6", "3.7", "3.8", "3.9", "3.10", "3.11" ]
|
||||||
|
|
||||||
|
env:
|
||||||
|
test_results_dir: test-results-${{ matrix.python-version }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: ${{ matrix.python-version }}
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
@ -26,19 +39,19 @@ jobs:
|
||||||
- name: Test
|
- name: Test
|
||||||
run: |
|
run: |
|
||||||
cd src
|
cd src
|
||||||
mkdir -p ../test-results
|
mkdir -p ../$test_results_dir
|
||||||
python3 -m pytest --junitxml=../test-results/junit.xml -o junit_family=legacy
|
python3 -m pytest --junitxml=../$test_results_dir/junit.xml -o junit_family=legacy
|
||||||
- name: Upload test results
|
- name: Upload test results
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
if: success() || failure()
|
if: success() || failure()
|
||||||
with:
|
with:
|
||||||
name: test-results
|
name: ${{ env.test_results_dir }}
|
||||||
path: test-results
|
path: ${{ env.test_results_dir }}
|
||||||
|
|
||||||
- name: Report tests
|
- name: Report tests
|
||||||
uses: dorny/test-reporter@v1
|
uses: dorny/test-reporter@v1
|
||||||
if: success() || failure()
|
if: success() || failure()
|
||||||
with:
|
with:
|
||||||
name: Tests
|
name: Results on Python ${{ matrix.python-version }}
|
||||||
path: 'test-results/junit.xml'
|
path: "${{env.test_results_dir }}/junit.xml"
|
||||||
reporter: java-junit
|
reporter: java-junit
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue