-
Notifications
You must be signed in to change notification settings - Fork 53
53 lines (53 loc) · 1.9 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
52
53
name: Tests
on: [pull_request, push]
jobs:
lint_python:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- {name: Linux, python: '3.9', os: ubuntu-latest}
- {name: Windows, python: '3.9', os: windows-latest}
- {name: Mac, python: '3.9', os: macos-latest}
- {name: '3.8', python: '3.8', os: ubuntu-latest}
- {name: '3.7', python: '3.7', os: ubuntu-latest}
- {name: '3.6', python: '3.6', os: ubuntu-latest}
- {name: '3.5', python: '3.5', os: ubuntu-latest}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: update pip
run: |
pip install -U wheel
pip install -U setuptools
python -m pip install -U pip
- name: get pip cache dir
id: pip-cache
run: echo "::set-output name=dir::$(pip cache dir)"
- name: cache pip
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.python }}-${{ hashFiles('requirements/dev.txt') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python }}-${{ hashFiles('requirements/dev.txt') }}
${{ runner.os }}-${{ matrix.python }}
- name: install dependencies
run: pip install -r requirements/dev.txt
if: matrix.python != '3.5'
- name: install py35 dependencies
run: pip install -r requirements/tests.txt
if: matrix.python == '3.5'
- name: lint python
run: |
black -l 120 --check . || true
codespell --quiet-level=2
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
isort --profile black .
if: matrix.python != '3.5'
- name: utils test
run: pytest .