-
Notifications
You must be signed in to change notification settings - Fork 53
48 lines (42 loc) · 1.18 KB
/
python.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Python extension
on:
push:
paths:
- 'py/**'
- '.github/workflows/python.yaml'
permissions:
contents: read
jobs:
test:
strategy:
fail-fast: false
matrix:
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
os: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Test Python - Windows
if: runner.os == 'Windows'
run: |
pip install virtualenv
virtualenv venv; venv\Scripts\activate.ps1
pwd
python -m pip install --upgrade pip maturin>=1.7.8
python -m pip install pytest
maturin develop --manifest-path py/Cargo.toml
pytest py
# Non-windows
- name: Test Python - Non-Windows
if: runner.os != 'Windows'
run: |
pip install virtualenv
virtualenv venv; source venv/bin/activate
python -m pip install --upgrade pip maturin>=1.7.8
python -m pip install pytest
maturin develop --manifest-path py/Cargo.toml
pytest py