Skip to content

Commit 38189ac

Browse files
authored
Update ci.yml
1 parent f9d545a commit 38189ac

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,34 @@ jobs:
2727
- name: Install Rust
2828
uses: dtolnay/rust-toolchain@stable
2929

30-
- name: Build and install package
30+
- name: Create virtual environment
31+
run: python -m venv .venv
32+
33+
- name: Activate venv and build package (Unix)
34+
if: runner.os != 'Windows'
35+
run: |
36+
source .venv/bin/activate
37+
pip install maturin
38+
maturin develop
39+
40+
- name: Activate venv and build package (Windows)
41+
if: runner.os == 'Windows'
3142
run: |
43+
.venv\Scripts\activate
3244
pip install maturin
3345
maturin develop
3446
35-
- name: Run tests
36-
run: python test.py
47+
- name: Run tests (Unix)
48+
if: runner.os != 'Windows'
49+
run: |
50+
source .venv/bin/activate
51+
python test.py
52+
53+
- name: Run tests (Windows)
54+
if: runner.os == 'Windows'
55+
run: |
56+
.venv\Scripts\activate
57+
python test.py
3758
3859
lint:
3960
name: Lint

0 commit comments

Comments
 (0)