Skip to content

Commit

Permalink
chore: use builtin dep caching in actions/setup-node (jestjs#11747)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB authored and splincode committed Aug 24, 2021
1 parent b65a1d8 commit 826dbfe
Showing 1 changed file with 8 additions and 42 deletions.
50 changes: 8 additions & 42 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,10 @@ jobs:
steps:
- uses: actions/checkout@v2.3.4

- uses: actions/setup-node@v2.1.5
- uses: actions/setup-node@v2.4.0
with:
node-version: 14.x

- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"

- uses: actions/cache@v2.1.6
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: yarn2-${{ hashFiles('yarn.lock') }}
restore-keys: |
yarn2-
cache: yarn

- name: Validate cache
env:
Expand All @@ -54,18 +44,10 @@ jobs:

steps:
- uses: actions/checkout@v2.3.4
- uses: actions/setup-node@v2.1.5
- uses: actions/setup-node@v2.4.0
with:
node-version: 12.x
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- uses: actions/cache@v2.1.6
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: yarn2-${{ hashFiles('yarn.lock') }}
restore-keys: |
yarn2-
cache: yarn
- name: install
run: yarn --immutable
- name: build
Expand Down Expand Up @@ -101,18 +83,10 @@ jobs:
if: runner.os == 'Windows'
- uses: actions/checkout@v2.3.4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2.1.5
uses: actions/setup-node@v2.4.0
with:
node-version: ${{ matrix.node-version }}
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- uses: actions/cache@v2.1.6
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: yarn2-${{ hashFiles('yarn.lock') }}
restore-keys: |
yarn2-
cache: yarn
- name: install
run: yarn --immutable
- name: build
Expand Down Expand Up @@ -141,18 +115,10 @@ jobs:
if: runner.os == 'Windows'
- uses: actions/checkout@v2.3.4
- name: Use Node.js 14.x
uses: actions/setup-node@v2.1.5
uses: actions/setup-node@v2.4.0
with:
node-version: 14.x
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- uses: actions/cache@v2.1.6
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: yarn2-${{ hashFiles('yarn.lock') }}
restore-keys: |
yarn2-
cache: yarn
- name: install
run: yarn --immutable
- name: build
Expand Down

0 comments on commit 826dbfe

Please sign in to comment.