-
Notifications
You must be signed in to change notification settings - Fork 13
46 lines (41 loc) · 1.36 KB
/
test-and-report.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: ci.tests
on:
push:
pull_request:
branches:
- master
- staging
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.8", "3.9", "3.10", "3.11"]
name: Python ${{ matrix.python }}
steps:
- name: Checkout branch
uses: actions/checkout@v2
- name: Setup python ${{ matrix.python }}
uses: actions/setup-python@master
with:
python-version: ${{ matrix.python }}
- name: Install poetry
uses: snok/install-poetry@v1.3.3
with:
version: 1.2.2
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Install dependencies
run: poetry install --no-interaction
- name: Run tests and generate coverage report
run: |
poetry run pytest tests/ --ignore=tests/datafiles --cov=./ --cov-report=xml
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v1.5.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true