Skip to content

Ensure backwards compatibility #363

Ensure backwards compatibility

Ensure backwards compatibility #363

Workflow file for this run

---
name: Run unit tests
on: # yamllint disable-line rule:truthy
push:
branches:
- main
pull_request:
jobs:
pytest:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
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: Save PR number and coverage results
run: |
mkdir -p ./pr
echo ${{ github.event.number }} > ./pr/PR-number.txt
cp ./pytest-coverage.txt ./pr/pytest-coverage.txt
cp ./pytest.xml ./pr/pytest.xml
- uses: actions/upload-artifact@v4
with:
name: pr
path: pr/