-
Notifications
You must be signed in to change notification settings - Fork 5
37 lines (32 loc) · 1.13 KB
/
build.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
name: build
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install mypy==1.0.0 yapf pylint -r requirements.txt
- name: Check types with mypy
# Get all files with find because ** doesn't expand correctly.
# Run mypy twice, once to find missing stub packeges, then again after installing them.
run: |
find . -iname '*.py' | xargs mypy --namespace-packages --explicit-package-bases || true
yes | mypy --install-types
find . -iname '*.py' | xargs mypy --namespace-packages --explicit-package-bases
- name: Check formatting with yapf
run: |
yapf --diff --recursive .
- name: Check for lint errors with pylint
# Get all files with find because ** doesn't expand correctly.
run: |
find . -iname '*.py' | xargs python -m pylint --rcfile=setup.cfg
- name: Test with unittest
run: |
python -m unittest