Skip to content

python-formate/flake8-github-actions

Repository files navigation

flake8-github-actions

GitHub Actions integration for flake8.

Tests Linux Test Status Windows Test Status macOS Test Status Coverage
PyPI PyPI - Package Version PyPI - Supported Python Versions PyPI - Supported Implementations PyPI - Wheel
Activity GitHub last commit Maintenance PyPI - Downloads
QA CodeFactor Grade Flake8 Status mypy status
Other License GitHub top language Requirements Status

Installation

flake8-github-actions can be installed from PyPI.

To install with pip:

$ python -m pip install flake8-github-actions

Use with GitHub Actions

Example workflow:

---

name: Flake8

on:
  push:
  pull_request:
    branches: ["master"]

jobs:
  Run:
    name: "Flake8"
    runs-on: "ubuntu-18.04"

    steps:
      - name: Checkout 🛎️
        uses: "actions/checkout@v2"

      - name: Setup Python 🐍
        uses: "actions/setup-python@v2"
        with:
          python-version: "3.8"

      - name: Install dependencies 🔧
        run: |
          python -VV
          python -m site
          python -m pip install --upgrade pip setuptools wheel
          python -m pip install flake8
          python -m pip install flake8-github-actions

      - name: "Run Flake8"
        run: "flake8 --format github"

The annotations will look something like:

image