-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (38 loc) · 1000 Bytes
/
test.yml
File metadata and controls
46 lines (38 loc) · 1000 Bytes
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: Run Tests
on:
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest maturin
- name: Build and install Rust extension
run: |
maturin build --release --out dist
pip install dist/*.whl
- name: Run tests
run: |
# Move source out of the way so we test the installed package
mkdir _ignore
mv rao_algorithms _ignore/
pytest tests/
# Move it back for subsequent steps if any
mv _ignore/rao_algorithms .