Skip to content
This repository has been archived by the owner on Nov 26, 2023. It is now read-only.

Add a Github Action Linter (#57) #10

Add a Github Action Linter (#57)

Add a Github Action Linter (#57) #10

Workflow file for this run

name: Linters
on:
pull_request:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
flake8:
name: flake8
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- run: python -m pip install flake8
- name: flake8
# Pinned to v2.0.0.
uses: liskin/gh-problem-matcher-wrap@d8afa2cfb66dd3f982b1950429e652bc14d0d7d2
with:
linters: flake8
run: flake8 --max-line-length 89 --ignore=E203,W503 pycg
isort:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- run: python -m pip install isort
- name: isort
# Pinned to v2.0.0.
uses: liskin/gh-problem-matcher-wrap@d8afa2cfb66dd3f982b1950429e652bc14d0d7d2
with:
linters: isort
run: isort --check --diff pycg
black:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: black
uses: psf/black@stable