-
Notifications
You must be signed in to change notification settings - Fork 3
55 lines (45 loc) · 1.27 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
name: Coverage
on: [workflow_call]
jobs:
run:
name: Coverage
runs-on: ubuntu-latest
env:
OS: ubuntu-latest
PYTHON: '3.10'
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Cache
id: cache-pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest pytest_cov pytest_mock
- name: Install requirements
if: steps.cache-pip.outputs.cache-hit != 'true'
run: |
python -m pip install -r requirements-dev.txt
- name: Install Package
run: |
python -m pip install -e .
- name: Generate Report
run: |
python -m pytest --cov=./src/Aquila_Resolve/ --cov-report=xml --cov-fail-under=50
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v3.1.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
env_vars: OS,PYTHON
fail_ci_if_error: true
flags: unittests
verbose: true