-
Notifications
You must be signed in to change notification settings - Fork 5
61 lines (50 loc) · 1.22 KB
/
py-tests.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: py-tests
on:
push:
branches: [ main ]
paths:
- "python/**"
- "rust/**"
pull_request:
paths:
- "python/**"
- "rust/**"
workflow_dispatch:
workflow_call:
jobs:
call-rust-tests:
uses: nrel/altrios/.github/workflows/rust-tests.yaml@main
test:
needs: call-rust-tests
if: github.repository == 'nrel/altrios' || github.repository == 'nrel/altrios-private'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.9', '3.10']
env:
PYTHON: ${{ matrix.python-version }}
SHOW_PLOTS: false
steps:
- uses: actions/checkout@v3
- name: set up python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: install rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Rust unit tests
run: |
cd rust/
cargo test --workspace
cd altrios-core/
cargo test
- name: Python unit tests
run: |
pip install maturin pytest
pip install -e ".[dev]"
pytest python/altrios -s