Skip to content

Adding nutrients components #14 #27

Adding nutrients components #14

Adding nutrients components #14 #27

name: Advanced tests
on:
pull_request:
types: [ready_for_review, opened]
branches: [main]
jobs:
run-basic-tests:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
fail-fast: false
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
steps:
# check out PR HEAD commit
- name: check out PR HEAD commit
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
# set up a conda environment
- name: set up miniconda environment
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: testing-env
python-version: ${{ matrix.python-version }}
auto-update-conda: true
mamba-version: "*"
channels: conda-forge
channel-priority: true
# install dependencies on conda environment
- name: install package dependencies
run: |
mamba install udunits2=2.2.25
mamba install --file=requirements.txt
mamba install --file=requirements-tests.txt
# build dummy components required for tests
- name: make gfortran available (macos only)
if: matrix.os == 'macos-latest'
run: |
sudo ln -s /usr/local/bin/gfortran-10 /usr/local/bin/gfortran
sudo mkdir /usr/local/gfortran
sudo ln -s /usr/local/Cellar/gcc@10/*/lib/gcc/10 /usr/local/gfortran/lib
- name: build dummy C and Fortran components
run: |
(cd ./tests/tests/components && make)
# install package
- name: install package
run: |
pip install -e .
# run tests
- name: run advanced test suite
run: |
(cd ./tests && python run_all_tests.py)