46 lines (44 loc) · 1.09 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
name: Testing and automated code coverage
on:
push:
branches:
- 'master'
paths:
- 'archivy/**'
- 'tests/**'
- '.github/workflows/codecov.yml'
- 'requirements.txt'
- 'requirements-tests.txt'
pull_request:
paths:
- 'archivy/**'
- 'tests/**'
- '.github/workflows/codecov.yml'
- 'requirements.txt'
- 'requirements-tests.txt'
jobs:
run:
runs-on: ubuntu-latest
env:
PYTHON: '3.9'
steps:
- uses: actions/checkout@master
- name: Setup Python
uses: actions/setup-python@master
with:
python-version: 3.9
- name: Generate coverage report
run: |
sudo apt-get install ripgrep
pip install -r requirements-tests.txt
pip install .
pip install tests/test_plugin
pytest --cov=./ --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
files: ./coverage1.xml,./coverage2.xml
directory: ./coverage/reports/
env_vars: PYTHON
fail_ci_if_error: true