90 lines
2.1 KiB
YAML
90 lines
2.1 KiB
YAML
name: Lint Checks
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- "main"
|
|
tags:
|
|
- "v[0-9]+.[0-9]+.[0-9]+" # For releases, e.g. v1.2.0
|
|
- "v[0-9]+.[0-9]+.[0-9]+-[a-zA-Z0-9]+" # For prereleases, e.g. v1.3.0-alpha1
|
|
pull_request:
|
|
types: [opened, synchronize, reopened]
|
|
|
|
jobs:
|
|
lint_black:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Set up Python 3.13
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.13"
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
script/setup --dev
|
|
- name: Run black
|
|
run: ./script/lint_black
|
|
|
|
lint_flake8:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Set up Python 3.13
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.13"
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
script/setup --dev
|
|
- name: Run flake8
|
|
run: ./script/lint_flake8
|
|
|
|
lint_isort:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Set up Python 3.13
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.13"
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
script/setup --dev
|
|
- name: Run isort
|
|
run: ./script/lint_isort
|
|
|
|
lint_mypy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Set up Python 3.13
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.13"
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
script/setup --dev
|
|
- name: Run mypy
|
|
run: |
|
|
./script/lint_mypy
|
|
|
|
lint_pylint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Set up Python 3.13
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.13"
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
script/setup --dev
|
|
- name: Run pylint
|
|
run: ./script/lint_pylint
|
|
|