Skip to content

Commit

Permalink
chore: only use caching where install follows
Browse files Browse the repository at this point in the history
  • Loading branch information
rflechtner committed Apr 4, 2023
1 parent 9ff9597 commit c709d39
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 35 deletions.
27 changes: 12 additions & 15 deletions .github/workflows/test-node-candidate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,17 @@ jobs:
needs: cache_imgs

steps:
- uses: actions/download-artifact@v3
with:
name: build
- name: unzip
run: unzip build.zip -d .
- name: Use Node.js 14
uses: actions/setup-node@v3
with:
node-version: 14
cache: 'yarn'
- name: Log out node version
run: node --version
- uses: actions/download-artifact@v3
with:
name: build
- name: unzip
run: unzip build.zip -d .

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
Expand Down Expand Up @@ -98,16 +97,15 @@ jobs:
needs: build

steps:
- name: Use Node.js 14
uses: actions/setup-node@v3
with:
node-version: 14
- uses: actions/download-artifact@v3
with:
name: build
- name: unzip
run: unzip build.zip -d .
- name: Use Node.js 14
uses: actions/setup-node@v3
with:
node-version: 14
cache: 'yarn'
- name: yarn bundle
run: yarn bundle
- name: upload bundle artifact
Expand All @@ -122,6 +120,9 @@ jobs:
needs: [cache_imgs, bundle_cache]

steps:
- uses: actions/setup-node@v3
with:
node-version: '16.x'
- uses: actions/download-artifact@v3
with:
name: build
Expand All @@ -131,10 +132,6 @@ jobs:
with:
name: checked-nonmin-bundle
path: packages/sdk-js/dist
- uses: actions/setup-node@v3
with:
node-version: '16.x'
cache: 'yarn'
- run: basename /packages/sdk-js/dist/
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/tests-polkadot-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'

- name: delete yarn.lock
run: rm -f yarn.lock
Expand Down
36 changes: 16 additions & 20 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,15 @@ jobs:
needs: build

steps:
- name: Use Node.js 14
uses: actions/setup-node@v3
with:
node-version: 14
- uses: actions/download-artifact@v3
with:
name: build
- name: unzip
run: unzip build.zip -d .
- name: Use Node.js 14
uses: actions/setup-node@v3
with:
node-version: 14
cache: 'yarn'
- name: lint
run: yarn lint
- name: check dependency duplication
Expand Down Expand Up @@ -125,18 +124,17 @@ jobs:
continue-on-error: ${{ matrix.required == 'optional' }}

steps:
- uses: actions/download-artifact@v3
with:
name: build
- name: unzip
run: unzip build.zip -d .
- name: Use Node.js 14
uses: actions/setup-node@v3
with:
node-version: 14
cache: 'yarn'
- name: Log out node version
run: node --version
- uses: actions/download-artifact@v3
with:
name: build
- name: unzip
run: unzip build.zip -d .

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
Expand Down Expand Up @@ -172,16 +170,15 @@ jobs:
needs: build

steps:
- name: Use Node.js 14
uses: actions/setup-node@v3
with:
node-version: 14
- uses: actions/download-artifact@v3
with:
name: build
- name: unzip
run: unzip build.zip -d .
- name: Use Node.js 14
uses: actions/setup-node@v3
with:
node-version: 14
cache: 'yarn'
- name: yarn bundle
run: yarn bundle
- name: upload bundle artifact
Expand All @@ -204,6 +201,9 @@ jobs:

continue-on-error: ${{ matrix.required == 'optional' }}
steps:
- uses: actions/setup-node@v3
with:
node-version: '16.x'
- uses: actions/download-artifact@v3
with:
name: build
Expand All @@ -213,10 +213,6 @@ jobs:
with:
name: checked-nonmin-bundle
path: packages/sdk-js/dist
- uses: actions/setup-node@v3
with:
node-version: '16.x'
cache: 'yarn'

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
Expand Down

0 comments on commit c709d39

Please sign in to comment.