-
Notifications
You must be signed in to change notification settings - Fork 14
31 lines (29 loc) · 822 Bytes
/
format.yml
File metadata and controls
31 lines (29 loc) · 822 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: format
on: [push, pull_request]
jobs:
format:
runs-on: ubuntu-latest
strategy:
matrix:
linter: [black, isort, flake8, mypy]
include:
- linter: black
command: black --check --diff .
- linter: isort
command: isort --check-only --diff .
- linter: flake8
command: flake8 --count .
- linter: mypy
command: mypy .
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
- name: Install dependencies
run: uv sync --frozen
- name: Run ${{ matrix.linter }} check
run: uv run ${{ matrix.command }}