Skip to content

Commit c8c5eea

Browse files
committed
Add GitHub Actions workflows for linting and testing
1 parent ae5a413 commit c8c5eea

2 files changed

Lines changed: 58 additions & 0 deletions

File tree

.github/workflows/lint.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Install uv
17+
uses: astral-sh/setup-uv@v3
18+
with:
19+
version: "latest"
20+
21+
- name: Install dependencies
22+
run: |
23+
uv venv
24+
uv pip install ruff
25+
26+
- name: Check formatting with ruff
27+
run: uv run ruff format --check
28+
29+
- name: Run linting with ruff (all rules)
30+
run: uv run ruff check

.github/workflows/test.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Install uv
17+
uses: astral-sh/setup-uv@v3
18+
with:
19+
version: "latest"
20+
21+
- name: Install dependencies
22+
run: |
23+
uv venv
24+
uv pip install -e .
25+
uv pip install pytest
26+
27+
- name: Run tests with pytest
28+
run: uv run pytest

0 commit comments

Comments
 (0)