-
Notifications
You must be signed in to change notification settings - Fork 45
62 lines (58 loc) · 1.74 KB
/
ci_tests.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: CI Tests
on:
push:
pull_request:
env:
TOXARGS: '-v'
jobs:
ci-tests:
name: ${{ matrix.os }}, ${{ matrix.tox_env }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
python: '3.7'
tox_env: 'py37-test-alldeps'
- os: ubuntu-latest
python: '3.9'
tox_env: 'py39-test-alldeps'
- os: macos-latest
python: '3.8'
tox_env: 'py38-test-alldeps'
- os: windows-latest
python: '3.8'
tox_env: 'py38-test-alldeps'
- os: ubuntu-latest
python: '3.8'
tox_env: 'py38-test'
- os: ubuntu-latest
python: '3.9'
tox_env: 'codestyle'
steps:
- name: Check out repository
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: true
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install base dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Print Python, pip, setuptools, and tox versions
run: |
python -c "import sys; print(f'Python {sys.version}')"
python -c "import pip; print(f'pip {pip.__version__}')"
python -c "import setuptools; print(f'setuptools {setuptools.__version__}')"
python -c "import tox; print(f'tox {tox.__version__}')"
- name: Run tests
run: tox -e ${{ matrix.tox_env }} -- ${{ matrix.toxposargs }}
- name: Upload coverage to codecov
if: "contains(matrix.tox_env, '-cov')"
uses: codecov/codecov-action@v2
with:
file: ./coverage.xml