blob: 9a5828dee756c5b65682ad5e533bc68bb78bf724 (
plain)
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
51
52
53
54
55
56
57
58
59
|
name: test
on:
push:
branches-ignore: [deploy]
pull_request:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
strategy:
matrix:
python-version: ['3.8', '3.9']
experimental: [false]
include:
- python-version: '3.10.0-alpha - 3.10.0'
experimental: true
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Configure pip cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/*') }}
restore-keys: ${{ runner.os }}-pip-
# experimental targets generally lack lxml wheels
- name: Install libxml2 and libxslt development packages
if: ${{ matrix.experimental }}
run: sudo apt install libxml2-dev libxslt-dev python-dev
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/test.txt
pip install -r requirements/ci.txt
pip install .
- name: Test with pytest
# forcibly enable pytest colors
env:
PY_COLORS: 1
run: |
pytest --cov --cov-report=term --cov-report=xml -v
- name: Submit code coverage to codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
|