-
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (40 loc) · 1.35 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Coverage
on:
push:
branches: [ main, ]
pull_request:
branches: [ main, ]
workflow_dispatch:
jobs:
code-coverage:
name: Code Coverage
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout
uses: actions/checkout@v3
# Setup Python
- name: Setup Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
# Setup Poetry
# https://github.com/abatilo/actions-poetry
- name: Setup Poetry
uses: abatilo/[email protected]
with:
poetry-version: "1.2.0"
- name: Install dependencies with test/coverage dependencies
run: poetry install --with test --no-root
- name: Test with PyTest and get coverage report
run: poetry run invoke pytest-cov
# know more at https://github.com/codecov/codecov-action
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
# files: ./coverage1.xml,./coverage2.xml # optional
# flags: unittests # optional
name: codecov_report
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)