Skip to content

Commit 799eed3

Browse files
committed
.github/workflows: add lint/format CI
1 parent faca15d commit 799eed3

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/ruff.yml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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 dev -o requirements.txt
16+
uv pip install -r requirements.txt
17+
- name: ruff check
18+
run: ruff check --output-format=github .
19+
format:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: Install Python
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: "3.11"
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install uv
30+
uv pip compile pyproject.toml --extra dev -o requirements.txt
31+
uv pip install -r requirements.txt
32+
- name: ruff format
33+
run: ruff format --diff .
34+
# test:
35+
# runs-on: ubuntu-latest
36+
# steps:
37+
# - uses: actions/checkout@v4
38+
# - name: Install Python
39+
# uses: actions/setup-python@v5
40+
# with:
41+
# python-version: "3.11" # matrix?
42+
# - name: Install dependencies
43+
# run: |
44+
# python -m pip install uv
45+
# uv pip compile pyproject.toml --extra test -o requirements.txt
46+
# uv pip install -r requirements.txt
47+
# - name: pytest
48+
# run: pytest

0 commit comments

Comments
 (0)