Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite github tests #50

Merged
merged 2 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 30 additions & 23 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: Python package
defaults:
run:
shell: bash -leo pipefail {0}

on:
pull_request:
Expand All @@ -7,39 +10,43 @@ on:
- master

jobs:
test-on-linux:
run-tests:
runs-on: ${{ matrix.os }}
name: sunode - ${{ matrix.os }} - ${{ matrix.python-version }}
defaults:
run:
shell: bash -l {0}
strategy:
max-parallel: 6
fail-fast: false
matrix:
os: ["ubuntu-latest", "windows-latest"]
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install micromamba
uses: mamba-org/setup-micromamba@v1
with:
path: "sunode"
- name: Install miniconda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
activate-environment: sunode-dev
miniforge-version: latest
python-version: ${{ matrix.python-version }}
- name: Install Dependences
run: |
conda install --yes conda-build boa conda-verify pytest pytest-cov hypothesis statsmodels pytensor c-compiler
- name: Build package
environment-name: sunode-dev
create-args: >-
python=${{ matrix.python-version }}
pytest
pytest-cov
hypothesis
statsmodels
pytensor
c-compiler
sundials<6.0
numba
sympy
typing_extensions
cffi
xarray
init-shell: bash
- name: Get some debugging info
run: |
conda mambabuild --variants "{python: [${{ matrix.python-version }}]}" ./sunode/conda
- name: Install package
env
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be concerned about potential secret leakage here. Would it make sense to narrow this to the particular variables that are useful?

Otherwise everything looks in excellent shape!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I removed it.

which gcc
- name: Install sunode
run: |
conda install --yes -c file:///${CONDA_PREFIX}/conda-bld/ sunode
pip install -e .
- name: Test with coverage
run: |
# conda activate doesn't seem to set paths to the conda prefix correctly
env LD_LIBRARY_PATH=${CONDA_PREFIX}/lib pytest --cov=sunode --cov-report xml --cov-report term-missing sunode
pytest --cov=sunode --cov-report xml --cov-report term-missing sunode
52 changes: 0 additions & 52 deletions conda/meta.yaml

This file was deleted.