Skip to content

Commit

Permalink
CI: always fail on modified yarn.lock file
Browse files Browse the repository at this point in the history
Seems like `yarn install --frozen-lockfile` doesn't always fail when `yarn.lock` changes (we put there the option believing it does). See: yarnpkg/yarn#5840

Instead, we should simply try to install the dependencies as usual and fail if something in the repo changes unexpectedly.

Inspiration: facebook/docusaurus@4d93c89
  • Loading branch information
mrtnzlml committed Jul 6, 2021
1 parent 140d037 commit 291794d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/continuous-integration-javascript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ jobs:
cache: 'yarn'

- name: Install Yarn dependencies
run: yarn install --frozen-lockfile
# Command `yarn install --frozen-lockfile` doesn't always fail if `yarn.lock` is modified (https://github.com/yarnpkg/yarn/issues/5840).
# Instead, we are installing the dependencies as usual and checking that nothing changed.
run: |
yarn install
git diff --exit-code
- name: Run Flow checks
run: |
Expand Down

0 comments on commit 291794d

Please sign in to comment.