Skip to content

Commit f2ce5dc

Browse files
committed
Add initial actions for linting, formatting, and typechecking
1 parent 30fed43 commit f2ce5dc

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: CI - Lint & Typecheck
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths:
7+
- "**/*.py"
8+
- "pyproject.toml"
9+
- "uv.lock"
10+
- ".github/workflows/ci-lint-typecheck.yml"
11+
pull_request:
12+
paths:
13+
- "**/*.py"
14+
- "pyproject.toml"
15+
- "uv.lock"
16+
- ".github/workflows/ci-lint-typecheck.yml"
17+
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.ref }}
20+
cancel-in-progress: true
21+
22+
jobs:
23+
ruff:
24+
name: Ruff (lint + format)
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v4
28+
29+
- name: Ruff check
30+
uses: astral-sh/ruff-action@v3
31+
with:
32+
args: "check"
33+
34+
- name: Ruff format (check)
35+
uses: astral-sh/ruff-action@v3
36+
with:
37+
args: "format --check"
38+
39+
typecheck:
40+
name: Typecheck (pyrefly)
41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: actions/checkout@v4
44+
45+
- name: Set up Python
46+
uses: actions/setup-python@v5
47+
with:
48+
python-version: "3.13"
49+
cache: "pip"
50+
51+
- name: Install uv
52+
run: python -m pip install -U uv
53+
54+
- name: Sync typecheck deps (locked)
55+
run: uv sync --dev --frozen
56+
57+
- name: Run pyrefly
58+
run: uv run pyrefly check

0 commit comments

Comments
 (0)