-
Notifications
You must be signed in to change notification settings - Fork 2
46 lines (38 loc) · 1 KB
/
python_tests.yml
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
name: Python tests
on:
push:
branches: [ main, "feature/*" ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
RUST_LOG: debug
MATURIN_VERSION: '1.2.3'
RUST_TOOLCHAIN: nightly-2023-08-01
jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
python -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install maturin==${{ env.MATURIN_VERSION }}
pip install -r tests/requirements.txt
working-directory: ./py_maplib
- name: Set up nightly rust
run: |
rustup toolchain install ${{ env.RUST_TOOLCHAIN }}
rustup default ${{ env.RUST_TOOLCHAIN }}
- name: Build install package
run: |
source .venv/bin/activate
maturin develop
working-directory: ./py_maplib
- name: pytest
run: |
source ../.venv/bin/activate
pytest
working-directory: ./py_maplib/tests