Skip to content

Commit fd5c4e8

Browse files
committed
fix: install maturin
1 parent bd4fa54 commit fd5c4e8

1 file changed

Lines changed: 60 additions & 57 deletions

File tree

.github/workflows/test.yaml

Lines changed: 60 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,74 @@
11
name: Test
22

33
on:
4-
push:
5-
branches: [main]
6-
tags: ["*"]
7-
pull_request:
8-
workflow_dispatch:
4+
push:
5+
branches: [main]
6+
tags: ["*"]
7+
pull_request:
8+
workflow_dispatch:
99

1010
jobs:
11-
check-version:
12-
name: python
13-
runs-on: ubuntu-latest
14-
steps:
15-
- uses: actions/checkout@v5
16-
- name: Install uv
17-
uses: astral-sh/setup-uv@v6
11+
check-version:
12+
name: python
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v5
16+
- name: Install uv
17+
uses: astral-sh/setup-uv@v6
1818

19-
- name: Run tests
20-
run: uv run utils/check_version_sync.py && uv run utils/check_version_newer.py
19+
- name: Run tests
20+
run: uv run utils/check_version_sync.py && uv run utils/check_version_newer.py
2121

22-
test:
23-
name: test
24-
runs-on: ubuntu-latest
25-
needs: check-version
26-
steps:
27-
- uses: actions/checkout@v4
28-
- name: Install Rust
29-
uses: dtolnay/rust-toolchain@stable
30-
with:
31-
components: clippy, rustfmt
32-
- name: Cache Cargo
33-
uses: actions/cache@v4
34-
with:
35-
path: |
36-
~/.cargo/registry
37-
~/.cargo/git
38-
target
39-
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
40-
restore-keys: ${{ runner.os }}-cargo-
22+
test:
23+
name: test
24+
runs-on: ubuntu-latest
25+
needs: check-version
26+
steps:
27+
- uses: actions/checkout@v4
28+
- name: Install Rust
29+
uses: dtolnay/rust-toolchain@stable
30+
with:
31+
components: clippy, rustfmt
32+
- name: Cache Cargo
33+
uses: actions/cache@v4
34+
with:
35+
path: |
36+
~/.cargo/registry
37+
~/.cargo/git
38+
target
39+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
40+
restore-keys: ${{ runner.os }}-cargo-
4141

42-
- name: Format check
43-
run: cargo fmt --all -- --check
42+
- name: Format check
43+
run: cargo fmt --all -- --check
4444

45-
- name: Clippy
46-
run: cargo clippy --workspace --all-targets -- -D warnings
45+
- name: Clippy
46+
run: cargo clippy --workspace --all-targets -- -D warnings
4747

48-
- name: Rust tests
49-
run: cargo test --workspace
48+
- name: Rust tests
49+
run: cargo test --workspace
5050

51-
- name: Install uv
52-
run: curl -LsSf https://astral.sh/uv/install.sh | sh
51+
- name: Install uv
52+
run: curl -LsSf https://astral.sh/uv/install.sh | sh
5353

54-
- name: Set up Python
55-
uses: actions/setup-python@v5
56-
with:
57-
python-version: "3.13"
54+
- name: Set up Python
55+
uses: actions/setup-python@v5
56+
with:
57+
python-version: "3.13"
5858

59-
- name: Build and install package
60-
working-directory: kiru-py
61-
run: |
62-
uv venv
63-
source .venv/bin/activate
64-
maturin develop --release
59+
- name: Install maturin
60+
run: uv tool install maturin
6561

66-
- name: Run Python tests
67-
working-directory: kiru-py
68-
run: |
69-
source .venv/bin/activate
70-
uv sync --dev
71-
uv pytest python/test.py
62+
- name: Build and install package
63+
working-directory: kiru-py
64+
run: |
65+
uv venv
66+
source .venv/bin/activate
67+
maturin develop --release
68+
69+
- name: Run Python tests
70+
working-directory: kiru-py
71+
run: |
72+
source .venv/bin/activate
73+
uv sync --dev
74+
uv pytest python/test.py

0 commit comments

Comments
 (0)