Skip to content

Commit 8f62422

Browse files
committed
Install yarn with frozen lockfile on CI
1 parent b643d8b commit 8f62422

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ commands:
3030
keys:
3131
- npm-v2-{{ checksum "./test/sample/yarn.lock" }}
3232
- npm-v2-
33-
- run: bundle exec rake app:yarn_install
33+
- run: bundle exec rake app:yarn_install_frozen
3434
- save_cache:
3535
key: npm-v2-{{ checksum "./test/sample/yarn.lock" }}
3636
paths:

Rakefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,18 @@ namespace :app do
2525
sh "yarn install"
2626
end
2727
end
28+
29+
task :yarn_install_frozen do
30+
Dir.chdir("test/sample") do
31+
sh "yarn install --frozen-lockfile"
32+
end
33+
end
2834
end
2935

3036
task :compile do
3137
if defined?(Webpacker)
3238
Dir.chdir("test/sample") do
33-
sh "yarn install"
39+
sh "yarn install --frozen-lockfile"
3440
sh "RAILS_ENV=test ./bin/rake webpacker:compile"
3541
end
3642
end

0 commit comments

Comments
 (0)