|
1 | 1 | name: Test |
2 | 2 |
|
3 | 3 | 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: |
9 | 9 |
|
10 | 10 | 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 |
18 | 18 |
|
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 |
21 | 21 |
|
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- |
41 | 41 |
|
42 | | - - name: Format check |
43 | | - run: cargo fmt --all -- --check |
| 42 | + - name: Format check |
| 43 | + run: cargo fmt --all -- --check |
44 | 44 |
|
45 | | - - name: Clippy |
46 | | - run: cargo clippy --workspace --all-targets -- -D warnings |
| 45 | + - name: Clippy |
| 46 | + run: cargo clippy --workspace --all-targets -- -D warnings |
47 | 47 |
|
48 | | - - name: Rust tests |
49 | | - run: cargo test --workspace |
| 48 | + - name: Rust tests |
| 49 | + run: cargo test --workspace |
50 | 50 |
|
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 |
53 | 53 |
|
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" |
58 | 58 |
|
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 |
65 | 61 |
|
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