Skip to content

Commit f85dbbb

Browse files
committed
fixed: ci pipeline for venv
1 parent 292e3b6 commit f85dbbb

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

.github/workflows/CI.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,28 @@ jobs:
3636
python-version: ['3.10', '3.11']
3737
steps:
3838
- uses: actions/checkout@v4
39+
- uses: dtolnay/rust-toolchain@stable
3940
- uses: actions/setup-python@v5
4041
with:
4142
python-version: ${{ matrix.python-version }}
43+
- name: Create virtualenv
44+
run: |
45+
python -m venv .venv
46+
shell: bash
47+
- name: Activate virtualenv (Unix)
48+
if: runner.os != 'Windows'
49+
run: |
50+
echo "${{ github.workspace }}/.venv/bin" >> $GITHUB_PATH
51+
echo "VIRTUAL_ENV=${{ github.workspace }}/.venv" >> $GITHUB_ENV
52+
shell: bash
53+
- name: Activate virtualenv (Windows)
54+
if: runner.os == 'Windows'
55+
run: |
56+
echo "${{ github.workspace }}\.venv\Scripts" >> $env:GITHUB_PATH
57+
echo "VIRTUAL_ENV=${{ github.workspace }}\.venv" >> $env:GITHUB_ENV
58+
shell: pwsh
4259
- name: Install build tools
43-
run: pip install maturin pytest
60+
run: pip install maturin pytest numpy
4461
- name: Run Rust Tests
4562
run: cargo test --no-default-features -v
4663
- name: Build and Install (Dev)

0 commit comments

Comments
 (0)