Skip to content

Commit

Permalink
Install missing virtualenv in GitHub workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
pemistahl committed Aug 20, 2023
1 parent a227ccd commit 4dea923
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ on:

jobs:
rust-build:
name: ${{ matrix.name }}
name: Rust on ${{ matrix.name }}

runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:
uses: codecov/codecov-action@v3

python-build:
name: ${{ matrix.name }}
name: Python ${{ matrix.python-version }} on ${{ matrix.name }}

runs-on: ${{ matrix.os }}

Expand All @@ -171,12 +171,30 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'

- name: Create virtual environment for Maturin
run: python3 -m venv .venv

- name: Activate virtual environment on Linux and MacOS #source .venv/bin/activate
if: ${{ matrix.os != 'windows-latest' }}
run: echo ".venv/bin" >> $GITHUB_PATH

- name: Activate virtual environment on Windows #.venv\Scripts\activate.bat
if: ${{ matrix.os == 'windows-latest' }}
run: echo ".venv\Scripts" >> Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

- name: Install Maturin
run: pip install maturin

- name: Build Python extension and install pytest
uses: PyO3/maturin-action@v1
with:
command: develop
args: --extras=test
run: maturin develop --extras=test

#- name: Build Python extension and install pytest
# uses: PyO3/maturin-action@v1
# with:
# command: develop
# args: --extras=test

- name: Run Python unit tests
run: pytest tests/python/test_grex.py

0 comments on commit 4dea923

Please sign in to comment.