Merge pull request #444 from dylanmtaylor/patch-7

Bring in some of the good CI changes from #411
This commit is contained in:
Anton Hvornum 2021-05-15 14:17:29 +00:00 committed by GitHub
commit dfafed6b14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 42 additions and 12 deletions

2
.flake8 Normal file
View File

@ -0,0 +1,2 @@
[flake8]
ignore = E501, W191, E741, E266

40
.github/workflows/lint-python.yaml vendored Normal file
View File

@ -0,0 +1,40 @@
on: [push, pull_request]
name: Lint Python and Find Syntax Errors
jobs:
mypy:
runs-on: ubuntu-latest
container:
image: archlinux:latest
steps:
- uses: actions/checkout@v2
- run: pacman --noconfirm -Syu python mypy
- name: run mypy
run: mypy . --ignore-missing-imports
flake8:
runs-on: ubuntu-latest
container:
image: archlinux:latest
steps:
- uses: actions/checkout@v2
- run: pacman --noconfirm -Syu python python-pip
- run: python -m pip install --upgrade pip
- run: pip install flake8
- 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
pytest:
runs-on: ubuntu-latest
container:
image: archlinux:latest
steps:
- uses: actions/checkout@v2
- run: pacman --noconfirm -Syu python python-pip
- run: python -m pip install --upgrade pip
- run: pip install pytest
# TODO: Add tests and enable pytest checks.
# - name: Test with pytest
# run: |
# pytest

View File

@ -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