Skip to content

Commit

Permalink
Merge pull request #1688 from girder/ci-retry-nvm
Browse files Browse the repository at this point in the history
Cache nvm install in CI
  • Loading branch information
manthey authored Oct 16, 2024
2 parents 1546297 + 5a58284 commit ec8935e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,21 @@ commands:
command: |
echo 'export NVM_DIR="/opt/circleci/.nvm"' >> $BASH_ENV
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV
- restore_cache:
name: Restore nvm cache
key: v1-nvm-cache-<< parameters.node >>
- run:
name: Switch node versions
command: |
nvm install << parameters.node >>
nvm alias default << parameters.node >>
NODE_DIR=$(dirname $(which node))
echo "export PATH=$NODE_DIR:\$PATH" >> $BASH_ENV
- save_cache:
name: Save nvm cache
key: v1-nvm-cache-<< parameters.node >>
paths:
- /opt/circleci/.nvm/.cache
- run:
name: Check node versions
command: |
Expand Down

0 comments on commit ec8935e

Please sign in to comment.