Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Use setup-node action to cache dependencies #230

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 2 additions & 22 deletions .github/workflows/ci.yml
Expand Up @@ -20,17 +20,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: lts/*

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

- uses: actions/cache@v3
with:
path: ${{steps.yarn-cache-dir-path.outputs.dir}}
key: ${{runner.os}}-yarn-${{hashFiles('**/yarn.lock')}}
restore-keys: |
${{runner.os}}-yarn-
cache: yarn

- run: corepack yarn install --immutable

Expand Down Expand Up @@ -63,17 +53,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{matrix.node}}.x

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

- uses: actions/cache@v3
with:
path: ${{steps.yarn-cache-dir-path.outputs.dir}}
key: ${{runner.os}}-yarn-${{hashFiles('**/yarn.lock')}}
restore-keys: |
${{runner.os}}-yarn-
cache: yarn

- run: corepack yarn install --immutable
- run: corepack yarn build # We need the stubs to run the tests
Expand Down
12 changes: 1 addition & 11 deletions .github/workflows/publish.yml
Expand Up @@ -30,17 +30,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: lts/*

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

- uses: actions/cache@v3
with:
path: ${{steps.yarn-cache-dir-path.outputs.dir}}
key: ${{runner.os}}-yarn-${{hashFiles('**/yarn.lock')}}
restore-keys: |
${{runner.os}}-yarn-
cache: yarn

- name: Publish to the npm registry
run: |
Expand Down
12 changes: 1 addition & 11 deletions .github/workflows/update-nock-files.yml
Expand Up @@ -26,17 +26,7 @@ jobs:
# Let's use the oldest version supported to be sure the V8
# serialization is compatible with all supported versions.
node-version: 14.x

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

- uses: actions/cache@v3
with:
path: ${{steps.yarn-cache-dir-path.outputs.dir}}
key: ${{runner.os}}-yarn-${{hashFiles('**/yarn.lock')}}
restore-keys: |
${{runner.os}}-yarn-
cache: yarn

- run: corepack yarn install --immutable
- run: corepack yarn build # We need the stubs to run the tests
Expand Down