54 lines (51 loc) · 1.42 KB
/
codeqa-test.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
name: Python codeqa/test
on:
push:
branches: [master]
pull_request:
jobs:
flake8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check code style with Flake8
uses: TrueBrain/actions-flake8@v1.2
with:
path: src tests
test:
needs: [flake8]
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-10.15, windows-latest]
python-version: [2.7, 3.6, 3.9, pypy2, pypy3]
exclude:
- os: macos-11.0
python-version: pypy2
- os: macos-11.0
python-version: pypy3
- os: windows-latest
python-version: 2.7
- os: windows-latest
python-version: pypy2
- os: windows-latest
python-version: pypy3
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade setuptools
run: pip install "setuptools >= 40.9"
- name: Install the project
run: "pip install --no-binary=:all: ."
- name: Install test dependencies
run: pip install .[test]
- name: Test with pytest
run: python -b -m pytest -W always --cov-report=xml:pytest-cov.xml
- name: Send coverage data to Codecov
uses: codecov/codecov-action@v1
with:
file: pytest-cov.xml