Set up GitHub Action for linting

This will give faster linting feedback since we can skip compilation.
This commit is contained in:
Nguyễn Gia Phong 2020-08-24 11:42:45 +07:00
parent 2e39a68865
commit c2a848cf6c
2 changed files with 33 additions and 4 deletions

27
.github/workflows/lint.yml vendored Normal file
View File

@ -0,0 +1,27 @@
name: lint
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.9.0-beta.4 - 3.9.0
- name: Install tox
run: python -m pip install tox
- name: Main check
run: python -m tox -e lint

10
tox.ini
View File

@ -7,14 +7,16 @@ isolated_build = True
deps =
Cython
scipy
flake8
pytest-cov
commands =
flake8
pytest
commands = pytest
setenv = CYTHON_TRACE = 1
passenv = TRAVIS
[testenv:lint]
skip_install = true
deps = flake8
commands = flake8
[flake8]
filename = *.pxd, *.pyx, *.py
hang-closing = True