Skip to content

Commit a684352

Browse files
committed
2 parents 5e58f51 + 6402641 commit a684352

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/ci.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-24.04
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: "3.12.3"
21+
22+
- name: Cache pip
23+
uses: actions/cache@v3
24+
with:
25+
path: ~/.cache/pip
26+
key: ${{ runner.os }}-pip-ruff-v1
27+
28+
- name: Install dependencies
29+
run: |
30+
python -m pip install --upgrade pip
31+
pip install ruff
32+
33+
- name: Auto-fix code with Ruff
34+
run: |
35+
ruff format . --fix --line-length 88 --exclude migrations,venv || true
36+
37+
- name: Run Ruff linter
38+
run: |
39+
ruff check . --select ALL --ignore F401,W391 --line-length 88

0 commit comments

Comments
 (0)