-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (38 loc) · 1.14 KB
/
coverage-report.yml
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
41
name: 'coverage-report'
on:
push:
branches:
- main
- coverage # remove before merge to main
permissions:
contents: write
jobs:
coverage-report:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: "Install dependencies"
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r test-requirements.txt
- name: "Generate coverage"
run: |
coverage run --source=fingerprint_pro_server_api_sdk -m pytest
coverage html
coverage json
python ./generate_coverage_summary.py
rm ./htmlcov/.gitignore
- name: Create Coverage Badges
uses: jaywcjlove/coverage-badges-cli@e07f25709cd25486855c1ba1b26da53576ff3620
with:
source: coverage-summary.json
output: htmlcov/badges.svg
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@8817a56e5bfec6e2b08345c81f4d422db53a2cdc
with:
branch: gh-pages
folder: htmlcov