Skip to content

Commit

Permalink
Update test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mdpiper committed Nov 1, 2023
1 parent e3805ad commit ed6e79f
Showing 1 changed file with 11 additions and 30 deletions.
41 changes: 11 additions & 30 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,53 +19,34 @@ jobs:

strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.9]
os: [ubuntu-latest, macos-latest]
python-version: ["3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: true

- uses: conda-incubator/setup-miniconda@v2
- uses: mamba-org/setup-micromamba@v1
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
channels: conda-forge
channel-priority: true
micromamba-version: latest
environment-file: environment.yml

- name: Show conda installation info
- name: Build and install model
run: |
conda info
conda list
- name: Install requirements
run: |
conda install mamba
mamba install --file=requirements-build.txt --file=requirements-library.txt
mamba list
- name: Make C example
run: |
mkdir buildc && pushd buildc
mkdir build && pushd build
cmake ../external/bmi-example-c -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX
make install
popd
- name: Build and install package
run: |
pip install -e .
- name: Install testing dependencies
run: mamba install --file=requirements-testing.txt
pip install --no-build-isolation --editable .
- name: Test
- name: Test BMI
run: |
python -c 'import pymt_heatc'
bmi-test pymt_heatc.bmi:HeatModelC -vvv
- name: Install example dependencies
run: mamba install pymt
bmi-test pymt_heatc.bmi:HeatModelC --config-file=examples/config.txt --root-dir=examples -vvv
- name: Run examples
working-directory: ${{ github.workspace }}/examples
Expand Down

0 comments on commit ed6e79f

Please sign in to comment.