-
Notifications
You must be signed in to change notification settings - Fork 8
44 lines (41 loc) · 1.07 KB
/
lint.yml
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
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Lint code and check formatting
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
run_linter:
runs-on: ubuntu-latest
steps:
- name: Check out ${{ github.ref_name }}
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "0.5.6"
- name: Install packages
run: uv sync --all-extras --dev
- name: Run ruff
run: uvx ruff check
check_format:
runs-on: ubuntu-latest
steps:
- name: Check out ${{ github.ref_name }}
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "0.5.6"
- name: Install packages
run: uv sync --all-extras --dev
- name: Run ruff
run: uvx ruff format --check