Bring in some of the good CI changes from #411
This commit is contained in:
parent
67659b2b38
commit
ad444caf9d
|
|
@ -0,0 +1,20 @@
|
||||||
|
on: [push, pull_request]
|
||||||
|
name: Lint Python and Find Syntax Errors
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: archlinux:latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- run: pacman --noconfirm -Syu python python-pip mypy
|
||||||
|
- run: python -m pip install --upgrade pip
|
||||||
|
- run: pip install flake8 pytest black-but-with-tabs-instead-of-spaces
|
||||||
|
- name: Lint with flake8
|
||||||
|
run: |
|
||||||
|
# stop the build if there are Python syntax errors
|
||||||
|
flake8 . --count --select=E9,F63,F7 --show-source --statistics
|
||||||
|
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
||||||
|
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
||||||
|
- name: run mypy
|
||||||
|
run: mypy . --ignore-missing-imports
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
on: [push, pull_request]
|
|
||||||
name: Lint Python and Find Syntax Errors
|
|
||||||
jobs:
|
|
||||||
lint:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: archlinux:latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- run: pacman --noconfirm -Syu python python-pip mypy
|
|
||||||
- name: run mypy
|
|
||||||
run: mypy . --ignore-missing-imports
|
|
||||||
Loading…
Reference in New Issue