Skip to content

Commit

Permalink
python tests. (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlondschien authored Dec 30, 2021
1 parent c2dbf38 commit d4d7cef
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,36 @@ jobs:
cargo bench
git checkout ${{ github.head_ref }}
cargo bench
shell: bash -lxeu {0}
shell: bash -lxeu {0}

python-tests:
name: Python tests (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: [3.9]
os: [ubuntu-latest, macos-latest, windows-latest]

steps:

- uses: actions/checkout@v2

- uses: actions-rs/toolchain@v1
with:
toolchain: 'stable'

- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Build wheel
run: |
pip install --upgrade maturin
maturin build --release -m biosphere-py/Cargo.toml
- name: Install wheel
run: |
pip install numpy pytest
pip install --force-reinstall --no-index --find-links biosphere-py/target/wheels/ biosphere
- name: Run tests
run: pytest biosphere-py/tests

0 comments on commit d4d7cef

Please sign in to comment.