Skip to content

Commit

Permalink
✅(CircleCI) check if yarn.lock is up to date
Browse files Browse the repository at this point in the history
After to update the dependencies, we check if the yarn.lock
file is up to date. If not, an error is raised and the job is stopped.
  • Loading branch information
AntoLC committed Apr 3, 2023
1 parent 03ec826 commit d06942b
Showing 1 changed file with 39 additions and 4 deletions.
43 changes: 39 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -403,11 +403,12 @@ jobs:
- restore_cache:
keys:
- front-dependencies-<< pipeline.parameters.cache-version >>-{{ checksum "yarn.lock" }}
# If the yarn.lock file is not up-to-date with the package.json file,
# using the --frozen-lockfile should fail.
- run:
name: Install front-end dependencies
command: yarn install --frozen-lockfile
- run:
name: Check yarn.lock is up to date
command: yarn check --integrity
- run:
name: Compile translations
command: yarn compile-translations
Expand Down Expand Up @@ -479,11 +480,12 @@ jobs:
- restore_cache:
keys:
- v5-mail-dependencies-{{ checksum "yarn.lock" }}
# If the yarn.lock file is not up-to-date with the package.json file,
# using the --frozen-lockfile should fail.
- run:
name: Install node dependencies
command: yarn install --frozen-lockfile
- run:
name: Check yarn.lock is up to date
command: yarn check --integrity
- run:
name: Build mails
command: yarn build-mails
Expand Down Expand Up @@ -760,6 +762,9 @@ jobs:
- run:
name: Install configure lambda dependencies
command: yarn install --frozen-lockfile
- run:
name: Check yarn.lock is up to date
command: yarn check --integrity
- run:
name: Run configure lambda tests
command: yarn test
Expand Down Expand Up @@ -787,6 +792,9 @@ jobs:
- run:
name: Install complete lambda dependencies
command: yarn install --frozen-lockfile
- run:
name: Check yarn.lock is up to date
command: yarn check --integrity
- run:
name: Run complete lambda tests
command: yarn test
Expand All @@ -813,6 +821,9 @@ jobs:
- run:
name: Install complete lambda dependencies
command: yarn install --frozen-lockfile
- run:
name: Check yarn.lock is up to date
command: yarn check --integrity
- run:
name: Run medialive lambda tests
command: yarn test
Expand All @@ -839,6 +850,9 @@ jobs:
- run:
name: Install complete lambda dependencies
command: yarn install --frozen-lockfile
- run:
name: Check yarn.lock is up to date
command: yarn check --integrity
- run:
name: Run medialive lambda tests
command: yarn test
Expand All @@ -865,6 +879,9 @@ jobs:
- run:
name: Install complete lambda dependencies
command: yarn install --frozen-lockfile
- run:
name: Check yarn.lock is up to date
command: yarn check --integrity
- run:
name: Run medialive routing lambda tests
command: yarn test
Expand All @@ -891,6 +908,9 @@ jobs:
- run:
name: Install configure lambda dependencies
command: yarn install --frozen-lockfile
- run:
name: Check yarn.lock is up to date
command: yarn check --integrity
- run:
name: lint code
command: yarn prettier --list-different '**/*.+(json|js)'
Expand All @@ -910,6 +930,9 @@ jobs:
- run:
name: Install convert lambda dependencies
command: yarn install --frozen-lockfile
- run:
name: Check yarn.lock is up to date
command: yarn check --integrity
- run:
name: lint code
command: yarn prettier --list-different '**/*.+(json|js)'
Expand All @@ -932,6 +955,9 @@ jobs:
- run:
name: Install complete lambda dependencies
command: yarn install --frozen-lockfile
- run:
name: Check yarn.lock is up to date
command: yarn check --integrity
- run:
name: lint code
command: yarn prettier --list-different '**/*.+(json|js)'
Expand All @@ -954,6 +980,9 @@ jobs:
- run:
name: Install complete lambda dependencies
command: yarn install --frozen-lockfile
- run:
name: Check yarn.lock is up to date
command: yarn check --integrity
- run:
name: lint code
command: yarn prettier --list-different '**/*.+(json|js)'
Expand All @@ -976,6 +1005,9 @@ jobs:
- run:
name: Install complete lambda dependencies
command: yarn install --frozen-lockfile
- run:
name: Check yarn.lock is up to date
command: yarn check --integrity
- run:
name: lint code
command: yarn prettier --list-different '**/*.+(json|js)'
Expand All @@ -998,6 +1030,9 @@ jobs:
- run:
name: Install complete lambda dependencies
command: yarn install --frozen-lockfile
- run:
name: Check yarn.lock is up to date
command: yarn check --integrity
- run:
name: lint code
command: yarn prettier --list-different '**/*.+(json|js)'
Expand Down

0 comments on commit d06942b

Please sign in to comment.