-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (34 loc) · 1.01 KB
/
Copy pathcode-coverage.yml
File metadata and controls
40 lines (34 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: coverage
on:
push:
branches:
- main
paths:
- "**/*.py"
- "pyproject.toml"
- "!**/version.py"
workflow_call:
workflow_dispatch:
jobs:
test:
runs-on: thevickypedia-default
steps:
- uses: actions/checkout@v6
- name: Install dependencies
run: |
pip install ".[test]"
export PATH="$HOME/.local/bin:$PATH"
echo "$HOME/.local/bin" >> $GITHUB_PATH
echo "$(dirname $(which pip))" >> $GITHUB_PATH
- name: Run tests with coverage
run: python -m pytest --cov=uiauth --cov-report=xml --cov-report=html --cov-report=term-missing -v
- name: Write coverage summary to job summary
run: |
echo "## Test Coverage" >> $GITHUB_STEP_SUMMARY
python -m coverage report --format=markdown >> $GITHUB_STEP_SUMMARY
- name: Upload HTML coverage report
uses: actions/upload-artifact@v7
with:
name: coverage-html
path: htmlcov/
retention-days: 30