Skip to content

Github unit testing workflow using CTSM container #3

Github unit testing workflow using CTSM container

Github unit testing workflow using CTSM container #3

Workflow file for this run

name: Run fates unit tests with ctsm as the hos land model
on:
pull_request:
jobs:
ctsm-unit-test:
runs-on: ubuntu-latest
container:
image: ghcr.io/ngeet/containers/unit-test-ctsm:latest
env:
BRANCH_NAME: ${{ github.head_ref }}
BRANCH_URL: ${{ github.event.pull_request.head.repo.html_url }}
steps:
- name: Checkout code with git-fleximod
run: |
cd /CTSM
./bin/git-fleximod update
- name: Set up conda environment
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: testing
environment-file: testing/testing.yml
channels: conda-forge, defaults
- name: Activate spack environment and run tests
run: |
. /opt/spack-environment/activate.sh
echo "HOSTNAME: $HOSTNAME"
echo "HOME: $HOME"
echo "CIMEROOT: $CIMEROOT"
echo "NETCDF_FORTRAN_PATH: $NETCDF_FORTRAN_PATH"
echo "NETCDF_C_PATH: $NETCDF_C_PATH"
cd testing/
python run_unit_tests.py --test-list fire_fuel