Skip to content

Commit

Permalink
GH Actions: install libnetcdf via conda to use nc* commands
Browse files Browse the repository at this point in the history
  • Loading branch information
sadielbartholomew committed Apr 20, 2020
1 parent 63b4b2e commit ce9a5a4
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions .github/workflows/run-test-suite.yml
Expand Up @@ -14,8 +14,7 @@ on:

# Note a workflow can have 1+ jobs that can run sequentially or in parallel.
jobs:
# TODO: setup parallel runs (-job-2 etc.) of sub-tests for speed-up
test-suite-job-0:
run-test-suite-job:

# Set-up the build matrix. We run on different distros and Python versions.
strategy:
Expand Down Expand Up @@ -44,10 +43,32 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

# Setup conda, which is the simplest way to access all dependencies,
# especially as some are C-based so otherwise difficult to setup.
- name: Setup Miniconda
uses: goanpeca/setup-miniconda@v1.1.2
with:
miniconda-version: 'latest'
activate-environment: cfdm-latest
python-version: ${{ matrix.python-version }}
channels: anaconda

# Ensure shell is configured with conda activated:
- name: Check conda config
shell: bash -l {0}
run: |
conda info
conda list
conda config --show-sources
conda config --show
# Install cfdm dependencies pre-testing
# We do so with conda which was setup in a previous step.
- name: Install cfdm with its dependencies
shell: bash -l {0}
run: |
conda install -c anaconda libnetcdf
# (The other, Python-based, deps are installed during the below command)
# Important! Must install our development version of cfdm to test:
pip install -e .
# Provide another notification message
Expand All @@ -56,10 +77,10 @@ jobs:

# Finally run the test suite!
- name: Run test suite
shell: bash -l {0}
run: |
cd cfdm/test
python run_tests.py
# End with a message indicating the suite has completed its run
- name: Notify about a completed run
run: |
Expand Down

0 comments on commit ce9a5a4

Please sign in to comment.