Skip to content

Commit

Permalink
add conda cache restore to assembly pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
ktmeaton committed Jul 24, 2020
1 parent 280abf5 commit 9b9aaff
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ jobs:
#----------------------------------------------------------------------------#
install :
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
plague-phylogeography-cache-hit: ${{ steps.plague-phylogeography-env-cache.outputs.cache-hit }}
eager-cache-hit: ${{ steps.eager-env-cache.outputs.cache-hit }}
nextstrain-cache-hit: ${{ steps.nextstrain-env-cache.outputs.cache-hit }}
steps:
# Install nextflow
- name: install nextflow
Expand Down Expand Up @@ -159,15 +154,26 @@ jobs:
needs: install
runs-on: ubuntu-latest
steps:
#------------------------------------------------------------------------#
# Restore (cache) conda environments #
#------------------------------------------------------------------------#
# Setup conda
- name: setup conda
uses: goanpeca/setup-miniconda@v1
# Restore the plague-phylogeography conda env
- name: cache plague-phylogeography env
uses: actions/cache@v2
id: plague-phylogeography-env-cache
with:
path: |
/home/runner/miniconda/envs/plague-phylogeography-0.1.4dev
key: plague-phylogeography-env-cache-${{ runner.os }}-test2-${{ hashFiles('./ktmeaton-plague-phylogeography.yaml') }}
#------------------------------------------------------------------------#
# Test Pipeline #
#------------------------------------------------------------------------#
# Run Assembly Pipeline (only if cache restored)
- name: assembly pipeline
if: needs.install.outputs.plague-phylogeography-cache-hit == 'true'
if: steps.plague-phylogeography-env-cache.outputs.cache-hit == 'true'
shell: bash -l {0}
run: |
conda activate ${PHYLO_CONDA_ENV}
Expand Down

0 comments on commit 9b9aaff

Please sign in to comment.