-
Notifications
You must be signed in to change notification settings - Fork 25
81 lines (77 loc) · 2.05 KB
/
ci.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- name: Lint
os: ubuntu-latest
pyversion: '3.7'
dolint: 1
- name: Linux py36
os: ubuntu-latest
pyversion: '3.6'
tests: 1
- name: Linux py37
os: ubuntu-latest
pyversion: '3.7'
tests: 1
- name: Linux py38
os: ubuntu-latest
pyversion: '3.8'
tests: 1
- name: Linux py39
os: ubuntu-latest
pyversion: '3.9'
tests: 1
- name: Linux pypy3
os: ubuntu-latest
pyversion: 'pypy3'
tests: 1
- name: Windows py38
os: windows-latest
pyversion: '3.8'
tests: 1
- name: MacOS py38
os: macos-latest
pyversion: '3.8'
tests: 1
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.pyversion }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.pyversion }}
- uses: actions/setup-node@v2
if: matrix.dolint == 1
with:
node-version: '14'
- name: Install dependencies (lint and docs)
if: matrix.dolint == 1
run: |
python -m pip install --upgrade pip
pip install invoke pycodestyle flake8 sphinx
- name: Install dependencies (unit tests)
if: matrix.tests == 1
run: |
python -m pip install --upgrade pip
pip install invoke pytest pytest-cov
- name: Lint
if: matrix.dolint == 1
run: |
invoke test --style
- name: Build docs
if: matrix.dolint == 1
run: |
invoke docs --clean --build
- name: Test with pytest
if: matrix.tests == 1
run: |
invoke test --unit