Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .github/workflows/python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,17 @@ jobs:
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Run unit tests
run: |
python panc/src/main/scripts/panlint/tests.py
- name: Produce coverage report
run: |
coverage run --source=panc/src/main/scripts/panlint --omit panc/src/main/scripts/panlint/tests.py panc/src/main/scripts/panlint/tests.py
- name: Report Coverage
env:
TERM: xterm
run: |
coverage report
coverage report --format=markdown >> $GITHUB_STEP_SUMMARY
# Produce a quick and dirty coloured annotation with numbered lines
coverage annotate
awk -v ln=1 '{printf("%4d %s\n", ln++, $0) }' panc/src/main/scripts/panlint/panlint.py,cover |
sed 's#^\( \+[[:digit:]]\+\) !#'"$(tput setaf 1)"'\1 !#' |
sed 's#^\( \+[[:digit:]]\+\) >#'"$(tput setaf 2)"'\1 >#' |
sed 's#^\( \+[[:digit:]]\+\) #'"$(tput setaf 7)"'\1 #'