Skip to content

Commit

Permalink
Add caching of node deps in workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
m0ar committed Mar 21, 2024
1 parent f042cc2 commit db8bec8
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 9 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,15 @@ jobs:
- name: Set up the environment
# Replace this line with the appropriate setup for your project
# Examples:
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: 18
node-version-file: ".nvmrc"
check-latest: false
cache: "yarn"
cache-dependency-path: |
desci-models/yarn.lock
desci-server/yarn.lock
desci-repo/yarn.lock
- name: Set up docker-compose
run: |
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/build-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,14 @@ jobs:
- name: Set up the environment
# Replace this line with the appropriate setup for your project
# Examples:
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: 18
node-version-file: ".nvmrc"
check-latest: false
cache: "yarn"
cache-dependency-path: |
desci-models/yarn.lock
desci-server/yarn.lock
- name: Set up docker-compose
run: |
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/contracts-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@ jobs:
- name: Set up the environment
# Replace this line with the appropriate setup for your project
# Examples:
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: 18
node-version-file: ".nvmrc"
check-latest: false
cache: "yarn"
cache-dependency-path: "desci-contracts/yarn.lock"

- name: Install dependencies
run: cd desci-contracts && npm i -g yarn && yarn && yarn build
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/models-build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@ jobs:
- name: Set up the environment
# Replace this line with the appropriate setup for your project
# Examples:
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: 16
node-version-file: ".nvmrc"
check-latest: false
cache: "yarn"
cache-dependency-path: "desci-models/yarn.lock"

- name: Set up docker-compose
run: |
Expand All @@ -40,4 +43,4 @@ jobs:

- name: Run tests
run: |
cd desci-models && yarn generate && yarn test
cd desci-models && yarn generate && yarn test

0 comments on commit db8bec8

Please sign in to comment.