Skip to content

Commit d4c70f7

Browse files
committed
add container environment to simplify calls
1 parent cdf13aa commit d4c70f7

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

.github/workflows/unittest-ctsm.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,32 +9,35 @@ jobs:
99
container:
1010
image: ghcr.io/ngeet/containers/unit-test-ctsm:latest
1111
env:
12+
TESTING_DIR: /CTSM/src/fates/testing/
1213
BRANCH_NAME: ${{ github.head_ref }}
1314
BRANCH_URL: ${{ github.event.pull_request.head.repo.html_url }}
1415

1516
steps:
1617
- name: Checkout code with git-fleximod
1718
run: |
1819
cd /CTSM
19-
./bin/git-fleximod update
20+
./bin/git-fleximod updateA
21+
22+
- name: Echo some output
23+
run: |
24+
echo "HOSTNAME: $HOSTNAME"
25+
echo "HOME: $HOME"
2026
2127
- name: Set up conda environment
2228
uses: conda-incubator/setup-miniconda@v2
2329
with:
2430
miniconda-version: 'latest'
2531
activate-environment: testing
26-
environment-file: testing/testing.yml
32+
environment-file: ${{env.TESTING_DIR}}/testing.yml
2733
channels: conda-forge, defaults
2834

2935
- name: Activate spack environment and run tests
3036
run: |
3137
. /opt/spack-environment/activate.sh
32-
echo "HOSTNAME: $HOSTNAME"
33-
echo "HOME: $HOME"
34-
echo "CIMEROOT: $CIMEROOT"
3538
echo "NETCDF_FORTRAN_PATH: $NETCDF_FORTRAN_PATH"
3639
echo "NETCDF_C_PATH: $NETCDF_C_PATH"
37-
cd testing/
40+
cd ${{env.TESTING_DIR}}
3841
python run_unit_tests.py --test-list fire_fuel
3942
4043

0 commit comments

Comments
 (0)