Skip to content

Commit

Permalink
ci: add cache validation (#82)
Browse files Browse the repository at this point in the history
* chore: explicitly disable the global cache

* ci: add cache check

* chore: update incorrect checksums
  • Loading branch information
merceyz authored Jan 23, 2022
1 parent 1026fe1 commit 4344ba1
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 9 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,31 @@ on:
branches: [main]

jobs:
chore:
name: 'Testing chores'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- run: |
git fetch --no-tags --unshallow origin HEAD main
- uses: actions/setup-node@v2
with:
node-version: 14

- name: 'Check that the cache files are consistent with their remote sources'
run: |
if [[ $(git diff --name-only "$(git merge-base origin/"$TARGET_BRANCH" HEAD)" HEAD -- .yarn/cache | wc -l) -gt 0 ]]; then
yarn --immutable --immutable-cache --check-cache
fi
shell: bash
if: |
github.event.pull_request != ''
env:
TARGET_BRANCH: ${{github.event.pull_request.base.ref}}

build:
strategy:
fail-fast: false
Expand All @@ -20,6 +45,7 @@ jobs:

name: '${{matrix.platform}} w/ Node.js ${{matrix.node}}.x'
runs-on: ${{matrix.platform}}
needs: chore

steps:
- uses: actions/checkout@v2
Expand Down
10 changes: 5 additions & 5 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
enableGlobalCache: false
yarnPath: .yarn/releases/yarn-3.0.0.cjs
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ __metadata:
"@babel/plugin-syntax-nullish-coalescing-operator": ^7.8.0
peerDependencies:
"@babel/core": ^7.0.0-0
checksum: 5a20d8bcbf2926dde3e9edcf847eaa5485d0d0fea76d0683ef1cafb11e0c35e46620391916283e1a9c0f76351e8c5ecccebf0d3a6bdf24559c5ad381433a0e3a
checksum: 553988b4bc03ec51d97e16233a5d650b3e8ceb5e990bb7e412372c23fd3cd9192d145e5d8cd09d74e9302d0301e4992b9f427375601ca6607ff27d4836f9ffea
languageName: node
linkType: hard

Expand Down Expand Up @@ -4896,7 +4896,7 @@ fsevents@^2.1.2:
"lodash.set@npm:^4.3.2":
version: 4.3.2
resolution: "lodash.set@npm:4.3.2"
checksum: 4dfedacae1c1cf86385a2b6e30ba538f06c90d703a0abd83a11432d80ec24b4016fe27359cdc0554a02a31a468789cbb282801dd755e54581cf0295477e2341d
checksum: a9122f49eef9f2d0fc9061a33d87f8e5b8c6b23d46e8b9e9ce1529d3588d79741bd1145a3abdfa3b13082703e65af27ff18d8a07bfc22b9be32f3fc36f763f70
languageName: node
linkType: hard

Expand Down Expand Up @@ -5246,7 +5246,7 @@ fsevents@^2.1.2:
json-stringify-safe: ^5.0.1
lodash.set: ^4.3.2
propagate: ^2.0.0
checksum: cc76d951783a0fe10c4a60800168f772d25fb0e1c87702f57db74d84a9bf0f5d4c25a5aa53717829e781f49f873ebdcb42d41efbcee097fff9f19633f321b485
checksum: 8217b7b45e48635b84a565866f4dd57eb4d3ea73e8a9091c8fa3a960ae819c3dc4298b6df979b17b014495c4f1bc5261ad71d02566a29f575e71f937c4c42922
languageName: node
linkType: hard

Expand Down Expand Up @@ -5796,7 +5796,7 @@ fsevents@^2.1.2:
"propagate@npm:^2.0.0":
version: 2.0.1
resolution: "propagate@npm:2.0.1"
checksum: dd67518106bb3f1ee230b7e246a18285467e010b89703844f120c38e1462b52d79bddd4be0f8db080377a3d55218209674eae9eb672c29a033bf6b44cfc42828
checksum: c4febaee2be0979e82fb6b3727878fd122a98d64a7fa3c9d09b0576751b88514a9e9275b1b92e76b364d488f508e223bd7e1dcdc616be4cdda876072fbc2a96c
languageName: node
linkType: hard

Expand Down

0 comments on commit 4344ba1

Please sign in to comment.