---
name: flake8

on:
  push:
    paths:
      - "**.py"
      - ".flake8"
      - "requirements.txt"
      - ".github/workflows/flake8.yaml"
  pull_request:
    paths:
      - "**.py"
      - ".flake8"
      - "requirements.txt"
      - ".github/workflows/flake8.yaml"

jobs:
  flake8:
    name: Python Lint Flake8
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-python@v2
        with:
          python-version: "3.8"
      - name: Install flake8
        run: pip install flake8
      - name: Run flake8
        run: flake8 --show-source --statistics .
