Skip to content

Commit 5ad30cc

Browse files
committed
add caching
1 parent 42d3ec0 commit 5ad30cc

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.semaphore/semaphore.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# copied from https://docs.semaphoreci.com/article/50-pipeline-yaml
2+
# NodeJS and JavaScript docs
3+
# https://docs.semaphoreci.com/article/82-language-javascript-and-nodejs
24
version: v1.0
35
name: Cypress example Kitchensink
46
agent:
@@ -15,6 +17,14 @@ blocks:
1517
- echo $SEMAPHORE_PIPELINE_ID
1618
- echo $HOME
1719
- echo $SEMAPHORE_GIT_DIR
18-
prologue:
20+
- name: Install dependencies
21+
task:
22+
jobs:
23+
- name: npm ci and cache
1924
commands:
2025
- checkout
26+
- cache restore npm-$SEMAPHORE_GIT_BRANCH-$(checksum package-lock.json)
27+
- npm ci
28+
- cache store npm-$SEMAPHORE_GIT_BRANCH-$(checksum package-lock.json) ~/.npm
29+
# TODO store ~/.cache
30+
- npm run print-env -- SEMAPHORE

0 commit comments

Comments
 (0)