.github/workflows/linter.yml
name: Linter Checks
on: [push]
jobs:
main:
name: Main Job
runs-on: ubuntu-latest
container:
image: docker://dragoncomputer/dragonfire:latest
steps:
- uses: actions/checkout@v1
- name: Cache pip packages
uses: actions/cache@v1
with:
path: /root/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
pip3 install -e .
pip3 install pytest-faulthandler
apt-get -y install xvfb
- name: Lint with flake8
run: |
pip3 install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F72,F82 --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