Skip to content

Commit

Permalink
Revert "[Experiment] Skip yarn —frozen-lockfile if we had a cache hit. (
Browse files Browse the repository at this point in the history
#957)"

This isn't quite right, and after taking a moment to think about it,
there is a much better approach I will investigate soon.

This reverts commit f8739e7.
  • Loading branch information
stefanpenner committed Sep 16, 2021
1 parent f8739e7 commit b9e6fd7
Showing 1 changed file with 21 additions and 19 deletions.
40 changes: 21 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,17 @@ jobs:
steps:
- uses: actions/checkout@v1
- uses: volta-cli/action@v1
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: '**'
key: ${{ runner.os }}-yarn-v2-${{ hashFiles('**/yarn.lock') }}
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-v2
- name: yarn --frozen-lockfile
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile
${{ runner.os }}-yarn-
- run: yarn --frozen-lockfile
- name: lint
run: yarn lint

Expand All @@ -42,16 +43,17 @@ jobs:
steps:
- uses: actions/checkout@v1
- uses: volta-cli/action@v1
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: '**'
key: ${{ runner.os }}-yarn-v2-${{ hashFiles('**/yarn.lock') }}
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-v2
- name: yarn --frozen-lockfile
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile
${{ runner.os }}-yarn-
- run: yarn --frozen-lockfile
- id: set-matrix
run: echo "::set-output name=matrix::$(node ./test-packages/support/suite-setup-util.js --matrix)"

Expand All @@ -67,17 +69,17 @@ jobs:
steps:
- uses: actions/checkout@v1
- uses: volta-cli/action@v1
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
if: runner.os != 'Windows'
id: yarn-cache
with:
path: '**'
key: ${{ runner.os }}-yarn-v2-${{ hashFiles('**/yarn.lock') }}
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-v2
- name: yarn --frozen-lockfile
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile
${{ runner.os }}-yarn-
- run: yarn --frozen-lockfile
- name: suite
run: ${{ matrix.command }}
working-directory: ${{ matrix.dir }}

0 comments on commit b9e6fd7

Please sign in to comment.