Skip to content

Add first unittest for Base device #6

Add first unittest for Base device

Add first unittest for Base device #6

Workflow file for this run

name: Run Python UnitTests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
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
- name: Add Coverage PR Comment
uses: marocchino/sticky-pull-request-comment@v2
if: github.event_name == 'pull_request'
with:
hide_and_recreate: true
path: code-coverage-results.md
- name: Write to Job Summary
run: cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY