-
Notifications
You must be signed in to change notification settings - Fork 3
39 lines (38 loc) · 1.17 KB
/
coverage.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
name: Coverage
run-name: Coverage for ${{ github.sha }}
on: [push]
jobs:
coverage:
timeout-minutes: 10
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./UnitTests
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Display Python version for testing purposes
run: python -c "import sys; print(sys.version)"
- name: Install Python dependencies
uses: py-actions/py-dependency-install@v4
with:
path: "requirements.txt"
- name: Run unittests with pytest and coverage
run: python -m pytest --cov -v --cov-report=html
- name: Coverage Badge.
uses: tj-actions/coverage-badge-py@v2
with:
working-directory: ./UnitTests
- name: Remove .gitignore from htmlcov
run: rm -f ./htmlcov/.gitignore
- name: Commit files
run: |
git pull
git config user.name github-actions
git config user.email github-actions@github.com
git add .
git commit -m "Updated coverage.svg"
git push