Implement Dimming actuator #103
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Python UnitTests | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
permissions: | |
checks: write | |
pull-requests: write | |
steps: | |
- name: Checkout Repo Code | |
uses: actions/checkout@v4 | |
- name: Install Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r src/abbfreeathome/dev-requirements.txt | |
- name: Install abbfreeathome Python Package | |
run: | | |
pip install . | |
- name: Test with pytest | |
run: | | |
pytest \ | |
--doctest-modules \ | |
--junitxml=junit/test-results.xml \ | |
--cov=abbfreeathome \ | |
--cov-report=xml:coverage/coverage.xml \ | |
--cov-report=html:coverage/htmlcov | |
- name: Code Coverage Summary Report | |
uses: irongut/[email protected] | |
with: | |
filename: coverage/coverage.xml | |
badge: true | |
format: markdown | |
output: both | |
fail_below_min: true | |
thresholds: '100 100' | |
- name: Write Coverage to Job Summary | |
if: success() || failure() # always run even if the previous step fails | |
run: cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY | |
- name: Publish Test Report | |
uses: mikepenz/[email protected] | |
if: success() || failure() # always run even if the previous step fails | |
with: | |
report_paths: junit/test-results.xml | |
detailed_summary: true | |
comment: false |