Skip to content

Commit

Permalink
Upgraded checksum tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tiziodcaio committed Apr 8, 2022
1 parent 559b64d commit dba362a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
29 changes: 25 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,16 @@ aliases:
restore_cache:
name: Restore yarn cache
key: v2-node-{{ arch }}-{{ checksum "yarn.lock" }}-yarn
- &checksum
run:
name: Generate cache key
command: ./scripts/circleci/checksum.sh .yarn/checksum

- &restore_node_modules
restore_cache:
name: Restore node_modules cache
keys:
- v2-node-{{ arch }}-{{ .Branch }}-{{ checksum "/tmp/checksum.txt" }}-node-modules
- v2-node-{{ arch }}-{{ .Branch }}-{{ checksum ".yarn/checksum" }}-node-modules

- &TEST_PARALLELISM 20

Expand Down Expand Up @@ -46,10 +50,10 @@ jobs:
- *restore_yarn_cache
- run:
name: Install Packages
command: yarn --immutable --immutable-cache --check-cache
command: yarn --immutable
- run:
name: Generate cache key
command: ./scripts/circleci/checksum.sh /tmp/checksum.txt
command: ./scripts/circleci/checksum.sh .yarn/checksum
- save_cache:
# Store the yarn cache globally for all lock files with this same
# checksum. This will speed up the setup job for all PRs where the
Expand All @@ -64,7 +68,7 @@ jobs:
# all jobs run on this branch with the same lockfile. Because of yarn workspaces info is deprecated, all yarn.lock and package.json files are checksummed.
name: Save node_modules cache
# This cache key is per branch, a yarn install in setup is required.
key: v2-node-{{ arch }}-{{ .Branch }}-{{ checksum "/tmp/checksum.txt" }}-node-modules
key: v2-node-{{ arch }}-{{ .Branch }}-{{ checksum ".yarn/checksum" }}-node-modules
paths:
- node_modules

Expand All @@ -74,6 +78,7 @@ jobs:

steps:
- checkout
- *checksum
- *restore_node_modules
- run: node ./scripts/prettier/index
- run: node ./scripts/tasks/eslint
Expand All @@ -88,6 +93,7 @@ jobs:

steps:
- checkout
- *checksum
- *restore_node_modules
- run: node ./scripts/tasks/flow-ci

Expand All @@ -97,6 +103,7 @@ jobs:

steps:
- checkout
- *checksum
- *restore_node_modules
- run:
command: |
Expand All @@ -113,6 +120,7 @@ jobs:
parallelism: 40
steps:
- checkout
- *checksum
- *restore_node_modules
- run: yarn build-combined
- persist_to_workspace:
Expand Down Expand Up @@ -151,6 +159,7 @@ jobs:
- checkout
- attach_workspace:
at: .
- *checksum
- *restore_node_modules
- run: echo "<< pipeline.git.revision >>" >> build/COMMIT_SHA
# Compress build directory into a single tarball for easy download
Expand All @@ -170,6 +179,7 @@ jobs:
- attach_workspace:
at: .
- run: echo "<< pipeline.git.revision >>" >> build/COMMIT_SHA
- *checksum
- *restore_node_modules
- run:
command: node ./scripts/tasks/danger
Expand All @@ -181,6 +191,7 @@ jobs:
- checkout
- attach_workspace:
at: .
- *checksum
- *restore_node_modules
- run:
name: Install Packages
Expand All @@ -199,6 +210,7 @@ jobs:
- checkout
- attach_workspace:
at: .
- *checksum
- *restore_node_modules
- run:
name: Install Packages
Expand All @@ -220,6 +232,7 @@ jobs:
- checkout
- attach_workspace:
at: .
- *checksum
- *restore_node_modules
- run: yarn lint-build

Expand All @@ -230,6 +243,7 @@ jobs:
- checkout
- attach_workspace:
at: .
- *checksum
- *restore_node_modules
- run: yarn check-release-dependencies

Expand All @@ -240,6 +254,7 @@ jobs:
steps:
- checkout
- attach_workspace: *attach_workspace
- *checksum
- *restore_node_modules
- run:
name: Search build artifacts for unminified errors
Expand All @@ -256,6 +271,7 @@ jobs:
type: string
steps:
- checkout
- *checksum
- *restore_node_modules
- run: yarn test <<parameters.args>> --ci

Expand All @@ -270,6 +286,7 @@ jobs:
- checkout
- attach_workspace:
at: .
- *checksum
- *restore_node_modules
- run:
name: Install nested packages from Yarn cache
Expand All @@ -283,6 +300,7 @@ jobs:
- checkout
- attach_workspace:
at: .
- *checksum
- *restore_node_modules
- run:
name: Run DOM fixture tests
Expand All @@ -299,6 +317,7 @@ jobs:
environment: *environment
steps:
- checkout
- *checksum
- *restore_node_modules
- run:
name: Run fuzz tests
Expand All @@ -318,6 +337,7 @@ jobs:
environment: *environment
steps:
- checkout
- *checksum
- *restore_node_modules
- run:
name: Run publish script
Expand All @@ -336,6 +356,7 @@ jobs:
environment: *environment
steps:
- checkout
- *checksum
- *restore_node_modules
- run:
name: Confirm reconciler forks are the same
Expand Down
Empty file modified scripts/circleci/checksum.sh
100644 → 100755
Empty file.

0 comments on commit dba362a

Please sign in to comment.