-
-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(ci): fail on package-lock.json sync issues #9111
- Loading branch information
Showing
1 changed file
with
29 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ version: 2.1 | |
parameters: | ||
lockindex: | ||
type: string | ||
default: '0' | ||
default: '1' | ||
|
||
orbs: | ||
windows: circleci/[email protected] | ||
|
@@ -79,15 +79,18 @@ commands: | |
steps: | ||
- checkout | ||
- restore_cache: | ||
key: << parameters.dir >>-<< pipeline.parameters.lockindex >>-{{ arch }}-{{ checksum "e2e/<< parameters.dir >>/package-lock.json" }} | ||
key: << parameters.dir >>-<< pipeline.parameters.lockindex >>-{{ arch }}-{{ checksum "e2e/<< parameters.dir >>/package.json" }}-{{ checksum "e2e/<< parameters.dir >>/package-lock.json" }} | ||
- run: | ||
name: NPM Install | ||
command: | | ||
md5sum e2e/<< parameters.dir >>/package-lock.json > package.md5 | ||
if [ ! -d "e2e/<< parameters.dir >>/node_modules/" ]; then | ||
npm run i:ci:<< parameters.dir >> | ||
fi | ||
md5sum -c package.md5 | ||
rm package.md5 | ||
- save_cache: | ||
key: << parameters.dir >>-<< pipeline.parameters.lockindex >>-{{ arch }}-{{ checksum "e2e/<< parameters.dir >>/package-lock.json" }} | ||
key: << parameters.dir >>-<< pipeline.parameters.lockindex >>-{{ arch }}-{{ checksum "e2e/<< parameters.dir >>/package.json" }}-{{ checksum "e2e/<< parameters.dir >>/package-lock.json" }} | ||
paths: | ||
- ./e2e/<< parameters.dir >>/node_modules | ||
- ~/.cache/puppeteer | ||
|
@@ -112,7 +115,7 @@ commands: | |
- attach_workspace: | ||
at: dist | ||
- restore_cache: | ||
key: << parameters.dir >>-<< pipeline.parameters.lockindex >>-{{ arch }}-{{ checksum "e2e/<< parameters.dir >>/package-lock.json" }} | ||
key: << parameters.dir >>-<< pipeline.parameters.lockindex >>-{{ arch }}-{{ checksum "e2e/<< parameters.dir >>/package.json" }}-{{ checksum "e2e/<< parameters.dir >>/package-lock.json" }} | ||
- run: | ||
name: Spreading Build | ||
command: npm run s:<< parameters.dir >> | ||
|
@@ -135,7 +138,7 @@ commands: | |
- attach_workspace: | ||
at: dist | ||
- restore_cache: | ||
key: << parameters.dir >>-<< pipeline.parameters.lockindex >>-{{ arch }}-{{ checksum "e2e/<< parameters.dir >>/package-lock.json" }} | ||
key: << parameters.dir >>-<< pipeline.parameters.lockindex >>-{{ arch }}-{{ checksum "e2e/<< parameters.dir >>/package.json" }}-{{ checksum "e2e/<< parameters.dir >>/package-lock.json" }} | ||
- run: | ||
name: Spreading Build | ||
command: npm run s:<< parameters.dir >> | ||
|
@@ -152,15 +155,18 @@ jobs: | |
steps: | ||
- checkout | ||
- restore_cache: | ||
key: root-<< pipeline.parameters.lockindex >>-{{ arch }}-{{ checksum "package-lock.json" }} | ||
key: root-<< pipeline.parameters.lockindex >>-{{ arch }}-{{ checksum "package.json" }}-{{ checksum "package-lock.json" }} | ||
- run: | ||
name: NPM Install | ||
command: | | ||
md5sum package-lock.json > package.md5 | ||
if [ ! -d "./node_modules/" ]; then | ||
npm ci | ||
fi | ||
md5sum -c package.md5 | ||
rm package.md5 | ||
- save_cache: | ||
key: root-<< pipeline.parameters.lockindex >>-{{ arch }}-{{ checksum "package-lock.json" }} | ||
key: root-<< pipeline.parameters.lockindex >>-{{ arch }}-{{ checksum "package.json" }}-{{ checksum "package-lock.json" }} | ||
paths: | ||
- ./node_modules | ||
- ~/.cache/puppeteer | ||
|
@@ -238,15 +244,18 @@ jobs: | |
steps: | ||
- checkout | ||
- restore_cache: | ||
key: tests-e2e-<< pipeline.parameters.lockindex >>-{{ arch }}-{{ checksum "tests-e2e/package-lock.json" }} | ||
key: tests-e2e-<< pipeline.parameters.lockindex >>-{{ arch }}-{{ checksum "tests-e2e/package.json" }}-{{ checksum "tests-e2e/package-lock.json" }} | ||
- run: | ||
name: NPM Install | ||
command: | | ||
md5sum tests-e2e/package-lock.json > package.md5 | ||
if [ ! -d "./tests-e2e/node_modules/" ]; then | ||
npm run i:tests-e2e | ||
fi | ||
md5sum -c package.md5 | ||
rm package.md5 | ||
- save_cache: | ||
key: tests-e2e-<< pipeline.parameters.lockindex >>-{{ arch }}-{{ checksum "tests-e2e/package-lock.json" }} | ||
key: tests-e2e-<< pipeline.parameters.lockindex >>-{{ arch }}-{{ checksum "tests-e2e/package.json" }}-{{ checksum "tests-e2e/package-lock.json" }} | ||
paths: | ||
- ./tests-e2e/node_modules | ||
- ~/.cache/puppeteer | ||
|
@@ -270,15 +279,18 @@ jobs: | |
steps: | ||
- checkout | ||
- restore_cache: | ||
key: docs-<< pipeline.parameters.lockindex >>-{{ arch }}-{{ checksum "docs/package-lock.json" }} | ||
key: docs-<< pipeline.parameters.lockindex >>-{{ arch }}-{{ checksum "docs/package.json" }}-{{ checksum "docs/package-lock.json" }} | ||
- run: | ||
name: NPM Install | ||
command: | | ||
md5sum docs/package-lock.json > package.md5 | ||
if [ ! -d "./docs/node_modules/" ]; then | ||
npm run i:docs | ||
fi | ||
md5sum -c package.md5 | ||
rm package.md5 | ||
- save_cache: | ||
key: docs-<< pipeline.parameters.lockindex >>-{{ arch }}-{{ checksum "docs/package-lock.json" }} | ||
key: docs-<< pipeline.parameters.lockindex >>-{{ arch }}-{{ checksum "docs/package.json" }}-{{ checksum "docs/package-lock.json" }} | ||
paths: | ||
- ./docs/node_modules | ||
- ~/.cache/puppeteer | ||
|
@@ -302,7 +314,7 @@ jobs: | |
steps: | ||
- checkout | ||
- restore_cache: | ||
key: root-<< pipeline.parameters.lockindex >>-{{ arch }}-{{ checksum "package-lock.json" }} | ||
key: root-<< pipeline.parameters.lockindex >>-{{ arch }}-{{ checksum "package.json" }}-{{ checksum "package-lock.json" }} | ||
- run: | ||
name: Default | ||
command: KARMA_SUITE=tests-performance/test.spec.ts npm run test | ||
|
@@ -350,7 +362,7 @@ jobs: | |
- attach_workspace: | ||
at: dist | ||
- restore_cache: | ||
key: a5es5-<< pipeline.parameters.lockindex >>-{{ arch }}-{{ checksum "e2e/a5es5/package-lock.json" }} | ||
key: a5es5-<< pipeline.parameters.lockindex >>-{{ arch }}-{{ checksum "e2e/a5es5/package.json" }}-{{ checksum "e2e/a5es5/package-lock.json" }} | ||
- run: nvm install $(cat e2e/a5es5/.nvmrc) | ||
- run: nvm use $(cat e2e/a5es5/.nvmrc) | ||
- run: | ||
|
@@ -359,11 +371,14 @@ jobs: | |
- run: | ||
name: NPM Install | ||
command: | | ||
md5sum e2e/a5es5/package-lock.json > package.md5 | ||
if [ ! -d "e2e/a5es5/node_modules/" ]; then | ||
npm run i:a5es5 | ||
fi | ||
md5sum -c package.md5 | ||
rm package.md5 | ||
- save_cache: | ||
key: a5es5-<< pipeline.parameters.lockindex >>-{{ arch }}-{{ checksum "e2e/a5es5/package-lock.json" }} | ||
key: a5es5-<< pipeline.parameters.lockindex >>-{{ arch }}-{{ checksum "e2e/a5es5/package.json" }}-{{ checksum "e2e/a5es5/package-lock.json" }} | ||
paths: | ||
- ./e2e/a5es5/node_modules | ||
- ~/.cache/puppeteer | ||
|