Skip to content

Commit acaa10b

Browse files
authored
Use yarn install --frozen-lockfile in CI (#1676)
1 parent 2b3b5e6 commit acaa10b

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

.travis.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,17 @@ env:
88
global:
99
- CXX=g++-4.8
1010
before_install:
11-
# Yarn defaults to an old version, make sure we
12-
# get an up to date version
13-
- npm install -g [email protected]
11+
# Yarn defaults to an old version, make sure we get an up to date version
12+
- npm install -g [email protected]
1413
- '[ "${NPM_TOKEN+x}" ] && echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > $HOME/.npmrc || echo "Skipping .npmrc creation";'
15-
14+
install:
15+
# --frozen-lockfile doesn’t generate a yarn.lock lockfile and should fail if an update is needed.
16+
# This will make sure that yarn.lock file in the PR is consistent with package.json.
17+
#
18+
# Due to a yarn issue (https://github.com/yarnpkg/yarn/issues/5840), --frozen-lockfile doesn't
19+
# actually fail if an update is required, but integrity check from tools/pretest.js will catch
20+
# the issue, so it still works as expected.
21+
- yarn install --frozen-lockfile
1622
before_script:
1723
- cp config/ci.config.json config/project.json
1824
- yarn build

0 commit comments

Comments
 (0)