Skip to content

Commit

Permalink
Add coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
vatai committed May 5, 2024
1 parent 3966b35 commit 33bb222
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Coverage

on: push
jobs:
run-radicalpy-coverage:
name: Run coverage on RadicalPy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python "3.11" 🐍
uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: 'pip'
- name: Install packages 📦
run: >-
python -m
pip install -r requirements.txt
- name: Install coverage
run: >-
python -m
pip install coverage
- name: Reset coverage
run: >-
coverage erase
- name: Run coverage
run: >-
coverage run -a python -m
unittest
discover -v
- name: Run examples
run: >-
for file in $(ls examples/*.py); do
PYTHONPATH=. coverage run -a python $file --fast
done
- name: Create report
run: >-
coverage report && coverage xml && ls -lrt
# - name: Code Coverage Report
# uses: irongut/CodeCoverageSummary@v1.3.0
# with:
# filename: coverage/**/coverage.cobertura.xml

0 comments on commit 33bb222

Please sign in to comment.