Return numpy arrays from Rust #742
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: tests | |
on: | |
push: | |
branches: [fastsim-2, fastsim-3] | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
python-version: ['3.8', '3.9', '3.10'] | |
env: | |
PYTHON: ${{ matrix.python-version }} | |
FASTSIM_DISABLE_NETWORK_TESTS: 1 | |
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 | |
# TODO: For some reason, `-e` is required in the pip install command | |
# This slows down installation, so should be fixed | |
# https://github.nrel.gov/MBAP/fastsim/issues/310 | |
- name: Python unit tests | |
run: | | |
pip install -e ".[dev]" && pytest -v python/fastsim/tests/ | |
pytest -v python/fastsim/demos/ |