-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (38 loc) · 1.16 KB
/
unittest.yaml
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
42
43
---
# this file is *not* meant to cover or endorse the use of GitHub Actions, but
# rather to help make automated releases for this project
name: Unittest Python Package
on: [push, pull_request]
permissions:
contents: read
jobs:
test-and-coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# all history is needed to crawl it properly
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.9'
- name: Execute tests
run: |
python -m pip install -U poetry
poetry install
python create_report_dirs.py
poetry run coverage run -m pytest -v
- name: Create coverage report
run: |
poetry run coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./reports/coverage/coverage.xml
flags: unittests
fail_ci_if_error: true
# path_to_write_report: ./reports/coverage/codecov_report.txt
verbose: true