Skip to content

Commit ebdca17

Browse files
committed
fix: use venv as required by maturin
1 parent 81b93d0 commit ebdca17

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

.github/workflows/_test.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: Run Tests
33
on:
44
workflow_call:
55

6+
env:
7+
CARGO_TERM_COLOR: always
8+
69
jobs:
710
rust:
811
strategy:
@@ -16,19 +19,27 @@ jobs:
1619
- run: rustup toolchain install stable --profile minimal
1720
- name: Rust Cache
1821
uses: Swatinem/[email protected]
19-
- name: Run Rust tests
22+
- name: Rust build
23+
run: cargo build --verbose
24+
- name: Rust tests
2025
run: cargo test --verbose
2126

2227
- uses: actions/setup-python@v5
2328
with:
2429
python-version: ${{ matrix.python-version }}
2530
cache: 'pip'
26-
- name: Install Python dependencies
31+
- name: Install Python global dependencies
2732
run: |
28-
pip3 install maturin pytest
29-
- name: Build Python bindings
33+
pip install maturin pytest
34+
- uses: actions/cache@v4
35+
with:
36+
path: .venv
37+
key: ${{ runner.os }}-python-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}
38+
restore-keys: |
39+
${{ runner.os }}-python-${{ matrix.python-version }}-
40+
- name: Python build & test
3041
run: |
42+
python -m venv .venv
43+
source .venv/bin/activate
3144
maturin develop
32-
- name: Run Python tests
33-
run: |
3445
pytest python/cocoindex/tests

0 commit comments

Comments
 (0)