-
Notifications
You must be signed in to change notification settings - Fork 3
35 lines (32 loc) · 942 Bytes
/
ci.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
name: CI
on:
push:
branches: [main]
paths-ignore:
- "README.md"
pull_request:
branches: [main]
paths-ignore:
- "README.md"
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10.4
uses: actions/setup-python@v2
with:
python-version: 3.10.4
- name: Install dependencies for requirements and testing
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f requirements_dev.txt ]; then pip install -r requirements_dev.txt; fi
- name: Test with pytest
run: |
pytest --cov src tests/ --cov-fail-under=90 --cov-report xml
- name: Upload to CodeCoverage
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}