-
Notifications
You must be signed in to change notification settings - Fork 681
51 lines (48 loc) · 1.22 KB
/
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
name: Tests
on:
push:
branches:
- master
pull_request:
paths:
- ".github/workflows/tests.yml"
- "requirements-tests.txt"
- "setup.*"
- "src/**/*"
- "tests/*.py"
jobs:
lint:
name: Linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: "3.7"
- name: Install test dependencies
run: python -m pip install tox
- name: Run flake8
run: |
tox -e flake8
tests:
name: Run tests for ${{ matrix.os }} for ${{ matrix.python }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python: [3.6, 3.7, 3.8, 3.9, "3.10", "pypy-3.7"]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.branch }}
- name: Use Python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install test dependencies
run: python -m pip install tox
- name: Test
run: python -m tox -e py