-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (48 loc) · 1.39 KB
/
ci.yaml
File metadata and controls
50 lines (48 loc) · 1.39 KB
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
name: CI
on: push
jobs:
py3test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.8", "3.9", "3.10" ]
services:
mongodb:
image: "mongo:5.0"
ports:
- 27017:27017
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up node
uses: actions/setup-node@v2
with:
node-version: "14"
- name: Set up python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: |
**/requirements-dev.txt
**/requirements.txt
- name: Set up environment
run: |
pip install --quiet -r ./requirements.txt -r ./requirements-dev.txt
pip install --quiet .
- name: Generate coverage report
run: |
pip install pytest pytest-cov
pytest --cov=./ --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
# # token: ${{ secrets.CODECOV_TOKEN }}
# directory: ./coverage/reports/
env_vars: OS,PYTHON
fail_ci_if_error: true
# files: ./coverage1.xml,./coverage2.xml
# flags: unittests
# name: codecov-umbrella
# path_to_write_report: ./coverage/codecov_report.txt
# verbose: true