-
-
Notifications
You must be signed in to change notification settings - Fork 23
30 lines (30 loc) · 923 Bytes
/
pytest.yml
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
---
name: Run unit tests
on: # yamllint disable-line rule:truthy
push:
branches:
- main
pull_request_target:
jobs:
pytest:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install pytest
run: pip install pytest pytest-cov
- name: Run pytest
# yamllint disable rule:line-length
run: |
set -o pipefail
PYTHONPATH=. pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=luxtronik tests/ | tee pytest-coverage.txt
# yamllint enable rule:line-length
- name: Publish pytest coverage as comment
uses: MishaKav/pytest-coverage-comment@main
with:
pytest-coverage-path: ./pytest-coverage.txt
junitxml-path: ./pytest.xml