Skip to content

lint

lint #576

Workflow file for this run

name: lint
permissions:
contents: read
on:
push:
branches:
- main
pull_request:
branches:
- main
release:
types:
- published
schedule:
# Run nightly to check that tests are working with latest dependencies
- cron: "0 0 * * *"
env:
UV_SYSTEM_PYTHON: 1
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.13"]
steps:
- name: Checkout commit locally
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
python-version: ${{ matrix.python-version }}
- name: Install subscript with dependencies
run: |
uv pip install ".[tests, docs]"
- name: Format and lint with ruff
run: |
ruff format . --check
ruff check .
- name: Check typing with mypy
run: mypy src/subscript