Skip to content

build(lint): consolidate linters under pre-commit #2660

build(lint): consolidate linters under pre-commit

build(lint): consolidate linters under pre-commit #2660

Workflow file for this run

name: Check
on:
- push
- pull_request
jobs:
pre-commit:
name: pre-commit
runs-on: ubuntu-latest
if: ${{ !startsWith(github.ref, 'refs/tags') }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.11" # minimum supported lang version
- name: Set up Node.js (for markdownlint)
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install dependencies
run: python -m pip install hatch 'click!=8.3.0'
- name: Run pre-commit hooks
run: hatch run lint:install-hooks && hatch run lint:precommit
pkglint:
name: pkglint
runs-on: ubuntu-latest
if: ${{ !startsWith(github.ref, 'refs/tags') }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.11" # minimum supported lang version
- name: Install dependencies
run: python -m pip install hatch 'click!=8.3.0'
- name: Run
run: hatch run lint:pkglint
docs:
name: readthedocs
runs-on: ubuntu-latest
if: ${{ !startsWith(github.ref, 'refs/tags') }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.11" # minimum supported lang version
- name: Install dependencies
run: python -m pip install hatch 'click!=8.3.0'
- name: Run
run: hatch run docs:build