diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index edf008d2793b818a3a8f442f12201fdeb3f07e48..b2622ac7e0fd00c3aab0cf77eb5d996ddfca28ee 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -109,7 +109,8 @@ setup-test-env:
   script:
     - node --version
     - yarn --version
-    - yarn install
+    - yarn install --pure-lockfile
+    - yarn check # ensure that yarn.lock matches package.json
     - bundle exec rake gitlab:assets:compile
     - bundle exec ruby -Ispec -e 'require "spec_helper" ; TestEnv.init'
   artifacts: