-
Notifications
You must be signed in to change notification settings - Fork 18
46 lines (44 loc) · 1.25 KB
/
pythonpackage.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
on:
push:
branches: [ master ]
pull_request:
branches: [ "*" ]
jobs:
lint-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v2
with:
path: |
~/.cache/pip
~/venv
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-v3-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-v3-
- name: Install dependencies
run: |
if [ ! -x venv ]; then python3 -m venv venv; fi
source ./venv/bin/activate
python -m pip install --upgrade pip wheel codecov setuptools
make install-dev
- name: Lint
run: |
source ./venv/bin/activate
make lint
- name: Test
run: |
source ./venv/bin/activate
pytest-gevent -v tests/ --cov=src --cov-report=xml --junitxml=test-reports/junit.xml
- name: Codecov
run: |
source ./venv/bin/activate
codecov