-
Notifications
You must be signed in to change notification settings - Fork 6
55 lines (55 loc) · 1.9 KB
/
codecov.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
name: Codecov
on: [push, pull_request]
jobs:
run:
name: test ${{ matrix.os }} / ${{ matrix.python }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python: ["3.8","3.9","3.10","3.11", "3.12"]
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python }}
steps:
- uses: actions/checkout@master
- uses: pdm-project/setup-pdm@v4
with:
python-version: ${{ matrix.python }}
- name: install deps
run: |
pdm use -f $PYTHON
pdm install -d
- name: Generate coverage report (default)
run: |
pdm run pytest --cov=aiopenapi3/ --cov-report=xml:./coverage/reports/coverage-default.xml tests/
pdm run pytest --cov=tests/ --cov-report=xml:./coverage/reports/coverage-default-tests.xml tests/
- name: install optional deps
run: |
pdm install -G auth,socks
- name: Generate coverage report (options)
run: |
pdm run pytest --cov=aiopenapi3/ --cov-report=xml:./coverage/reports/coverage-optional.xml tests/
pdm run pytest --cov=tests/ --cov-report=xml:./coverage/reports/coverage-optional-tests.xml tests/
- name: Upload coverage to Codecov (core)
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage/reports/
files: coverage-default.xml,coverage-optional.xml
env_vars: OS,PYTHON
fail_ci_if_error: false
flags: core
name: codecov-aiopenapi3
verbose: true
- name: Upload coverage to Codecov (tests)
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage/reports/
files: coverage-default-tests.xml,coverage-optional-tests.xml
env_vars: OS,PYTHON
fail_ci_if_error: false
flags: tests
name: codecov-aiopenapi3-tests
verbose: true