Skip to content

Commit 1c500cc

Browse files
committed
.github/workflows: add lint/format CI
1 parent e9b122c commit 1c500cc

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/ruff.yaml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: CI
2+
on: [ push, pull_request ]
3+
jobs:
4+
lint:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v4
8+
- name: Install Python
9+
uses: actions/setup-python@v5
10+
with:
11+
python-version: "3.11"
12+
- name: Install dependencies
13+
run: |
14+
python -m pip install uv
15+
uv pip compile pyproject.toml --extra ci | uv pip install --user -r -
16+
- name: ruff check
17+
run: ruff check --output-format=github .
18+
format:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
- name: Install Python
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: "3.11"
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install uv
29+
uv pip compile pyproject.toml --extra ci | uv pip install --user -r -
30+
- name: ruff format
31+
run: ruff format --diff .
32+
# test:
33+
# runs-on: ubuntu-latest
34+
# steps:
35+
# - uses: actions/checkout@v4
36+
# - name: Install Python
37+
# uses: actions/setup-python@v5
38+
# with:
39+
# python-version: "3.11" # matrix?
40+
# - name: Install dependencies
41+
# run: |
42+
# python -m pip install uv
43+
# uv pip compile pyproject.toml --extra test -o requirements.txt
44+
# uv pip install -r requirements.txt
45+
# - name: pytest
46+
# run: pytest

0 commit comments

Comments
 (0)