-
Notifications
You must be signed in to change notification settings - Fork 4
52 lines (39 loc) · 1.24 KB
/
format_and_lint.yml
File metadata and controls
52 lines (39 loc) · 1.24 KB
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
45
46
47
48
49
50
51
52
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
# We use "ruff" for linting and formatting
name: Format and Lint
on:
push:
pull_request:
branches: [main]
jobs:
format_and_lint:
name: Format and Lint Python
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Download misspell tool
run: |
wget https://github.com/client9/misspell/releases/download/v0.3.4/misspell_0.3.4_linux_64bit.tar.gz
tar -xzf misspell_0.3.4_linux_64bit.tar.gz
chmod +x misspell
- name: Run misspell
run: ./misspell -error .
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- name: Set up Python
run: uv python install 3.13
- name: Install the project
run: uv sync --all-extras --dev
- name: Lint with ruff
run: |
uvx ruff check
- name: Format with ruff
run: |
uvx ruff format --check .
- name: Typecheck with ty
run: |
uvx ty check