-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (43 loc) · 1.16 KB
/
tests.yaml
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
name: GerryDB client tests
on: [push, pull_request]
jobs:
run:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.10', '3.11']
os: [ubuntu-latest, macos-latest]
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python-version }}
steps:
- uses: actions/checkout@main
- name: Set up Python
uses: actions/setup-python@master
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install poetry
pip install .
pip install black isort
- name: Check formatting
run: |
python -m black . --check
python -m isort . --diff
- name: Run tests and generate coverage report
run: |
pip install pytest
pip install pytest-cov
pytest -v --cov=./ --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: .
env_vars: OS,PYTHON
fail_ci_if_error: true
files: ./coverage.xml
flags: unittests
name: codecov-umbrella
verbose: true