Skip to content

Commit be7d122

Browse files
committed
test adding lint.yml
1 parent 590a322 commit be7d122

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.github/workflows/lint.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Lint, Format, and Type Check
2+
3+
on:
4+
push:
5+
# branches:
6+
# - main
7+
paths:
8+
- 'src/**'
9+
- 'tests/**'
10+
- '.github/workflows/lint-and-type-check.yml'
11+
pull_request:
12+
# branches:
13+
# - main
14+
paths:
15+
- 'src/**'
16+
- 'tests/**'
17+
- '.github/workflows/lint-and-type-check.yml'
18+
workflow_dispatch:
19+
20+
defaults:
21+
run:
22+
shell: bash
23+
24+
concurrency:
25+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
26+
cancel-in-progress: true
27+
28+
jobs:
29+
check:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v4
34+
35+
- name: Install uv
36+
id: setup-uv
37+
uses: astral-sh/setup-uv@v5
38+
with:
39+
python-version: "3.11"
40+
41+
- name: Install the project
42+
run: uv sync --locked
43+
44+
- name: Run mypy
45+
run: uv run mypy .
46+
47+
- name: Run ruff lint
48+
run: uv run ruff check .
49+
50+
- name: Run ruff format
51+
run: uv run ruff format --check .

0 commit comments

Comments
 (0)