Skip to content

Commit 91fe461

Browse files
committed
fix: ci
1 parent 4f33688 commit 91fe461

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/ci.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Install Rye
18+
run: |
19+
curl -sSf https://rye.astral.sh/get | bash
20+
echo "$HOME/.rye/shims" >> $GITHUB_PATH
21+
22+
- name: Add Python to PATH
23+
run: echo "$(rye show python-path | head -n 1 | xargs dirname | xargs dirname)/bin" >> $GITHUB_PATH
24+
25+
- name: Cache Rye
26+
uses: actions/cache@v4
27+
with:
28+
path: |
29+
~/.cache/rye
30+
~/.rye
31+
key: ${{ runner.os }}-rye-${{ hashFiles('**/pyproject.toml', '**/pyproject.lock') }}
32+
restore-keys: |
33+
${{ runner.os }}-rye-
34+
35+
- name: Sync dependencies
36+
run: rye sync --no-dev
37+
38+
- name: Lint & Format (Ruff)
39+
run: rye run ruff check .
40+
41+
- name: Run tests
42+
run: rye run test

0 commit comments

Comments
 (0)