-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (45 loc) · 1.3 KB
/
run-unittests.yml
File metadata and controls
55 lines (45 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Run Unittests
on:
workflow_call:
inputs:
python-versions:
required: true
type: string
permissions:
contents: read
checks: write
jobs:
unittests:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ${{ fromJson(inputs.python-versions) }}
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: |
python -m pip install --upgrade pip
pip install poetry
- name: Install dependencies
run: poetry install --with dev
- name: Run unittests
run: |
mkdir -p reports
PYTHONPATH=./src:./tests poetry run pytest ./tests/unit --junitxml=reports/report.xml
- name: Upload JUnit report
uses: actions/upload-artifact@v4
with:
name: junit-report-${{ matrix.python-version }}
path: reports/report.xml
- name: Publish test report
uses: dorny/test-reporter@v1
with:
name: Unit Tests Report (${{ matrix.python-version }})
path: reports/report.xml
reporter: java-junit