Skip to content

Commit 30551ab

Browse files
committed
Rewrite github tests
1 parent a1e1038 commit 30551ab

File tree

2 files changed

+30
-75
lines changed

2 files changed

+30
-75
lines changed

.github/workflows/main.yml

Lines changed: 30 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
name: Python package
2+
defaults:
3+
run:
4+
shell: bash -leo pipefail {0}
25

36
on:
47
pull_request:
@@ -7,39 +10,43 @@ on:
710
- master
811

912
jobs:
10-
test-on-linux:
13+
run-tests:
1114
runs-on: ${{ matrix.os }}
1215
name: sunode - ${{ matrix.os }} - ${{ matrix.python-version }}
13-
defaults:
14-
run:
15-
shell: bash -l {0}
1616
strategy:
1717
max-parallel: 6
1818
fail-fast: false
1919
matrix:
2020
os: ["ubuntu-latest", "windows-latest"]
21-
python-version: ["3.9", "3.10", "3.11"]
21+
python-version: ["3.9", "3.10", "3.11", "3.12"]
2222
steps:
23-
- uses: actions/checkout@v3
23+
- uses: actions/checkout@v4
24+
- name: Install micromamba
25+
uses: mamba-org/setup-micromamba@v1
2426
with:
25-
path: "sunode"
26-
- name: Install miniconda
27-
uses: conda-incubator/setup-miniconda@v2
28-
with:
29-
auto-update-conda: true
30-
activate-environment: sunode-dev
31-
miniforge-version: latest
32-
python-version: ${{ matrix.python-version }}
33-
- name: Install Dependences
34-
run: |
35-
conda install --yes conda-build boa conda-verify pytest pytest-cov hypothesis statsmodels pytensor c-compiler
36-
- name: Build package
27+
environment-name: sunode-dev
28+
create-args: >-
29+
python=${{ matrix.python-version }}
30+
pytest
31+
pytest-cov
32+
hypothesis
33+
statsmodels
34+
pytensor
35+
c-compiler
36+
sundials<6.0
37+
numba
38+
sympy
39+
typing_extensions
40+
cffi
41+
xarray
42+
init-shell: bash
43+
- name: Get some debugging info
3744
run: |
38-
conda mambabuild --variants "{python: [${{ matrix.python-version }}]}" ./sunode/conda
39-
- name: Install package
45+
env
46+
which gcc
47+
- name: Install sunode
4048
run: |
41-
conda install --yes -c file:///${CONDA_PREFIX}/conda-bld/ sunode
49+
pip install -e .
4250
- name: Test with coverage
4351
run: |
44-
# conda activate doesn't seem to set paths to the conda prefix correctly
45-
env LD_LIBRARY_PATH=${CONDA_PREFIX}/lib pytest --cov=sunode --cov-report xml --cov-report term-missing sunode
52+
pytest --cov=sunode --cov-report xml --cov-report term-missing sunode

conda/meta.yaml

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)