Skip to content

Commit 6e129bb

Browse files
committed
Run yarn install and bundle install in frozen lockfile mode
1 parent 6bc73a0 commit 6e129bb

File tree

7 files changed

+16
-9
lines changed

7 files changed

+16
-9
lines changed

.github/workflows/examples.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ jobs:
1010
examples:
1111
env:
1212
SKIP_YARN_COREPACK_CHECK: 0
13+
BUNDLE_FROZEN: ${{ matrix.versions == 'oldest' && 'false' || 'true' }}
1314
strategy:
1415
fail-fast: false
1516
matrix:
@@ -71,7 +72,7 @@ jobs:
7172
run: echo "sha=\"$(git rev-parse HEAD)\"" >> "$GITHUB_OUTPUT"
7273
- name: Install Node modules with Yarn for renderer package
7374
run: |
74-
yarn install --no-progress --no-emoji
75+
yarn run install:ci
7576
sudo yarn global add yalc
7677
- name: yalc publish for react-on-rails
7778
run: yalc publish

.github/workflows/lint-js-and-ruby.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88

99
jobs:
1010
build:
11+
env:
12+
BUNDLE_FROZEN: ${{ matrix.versions == 'oldest' && 'false' || 'true' }}
1113
runs-on: ubuntu-22.04
1214
steps:
1315
- uses: actions/checkout@v4
@@ -43,7 +45,7 @@ jobs:
4345
key: package-app-gem-cache-${{ hashFiles('Gemfile.lock') }}-oldest
4446
- name: Install Node modules with Yarn for renderer package
4547
run: |
46-
yarn install --no-progress --no-emoji
48+
yarn run install:ci
4749
sudo yarn global add yalc
4850
- name: yalc publish for react-on-rails
4951
run: yalc publish
@@ -55,13 +57,13 @@ jobs:
5557
- name: yalc add react-on-rails
5658
run: cd spec/dummy && yalc add react-on-rails
5759
- name: Install Node modules with Yarn for dummy app
58-
run: cd spec/dummy && yarn install --no-progress --no-emoji
60+
run: cd spec/dummy && yarn run install:ci
5961
- name: Install Ruby Gems for package
6062
run: bundle check --path=vendor/bundle || bundle _2.5.9_ install --path=vendor/bundle --jobs=4 --retry=3
6163
- name: Lint Ruby
6264
run: bundle exec rubocop
6365
- name: Install Node modules with Yarn for dummy app
64-
run: cd spec/dummy && yarn install --ignore-scripts --no-progress --no-emoji
66+
run: cd spec/dummy && yarn run install:ci
6567
- name: Save dummy app ruby gems to cache
6668
uses: actions/cache@v4
6769
with:

.github/workflows/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
key: v5-package-node-modules-cache-${{ hashFiles('yarn.lock') }}
4949
- name: Install Node modules with Yarn for renderer package
5050
run: |
51-
yarn install --no-progress --no-emoji
51+
yarn run install:ci
5252
sudo yarn global add yalc
5353
- name: yalc publish for react-on-rails
5454
run: yalc publish
@@ -60,7 +60,7 @@ jobs:
6060
- name: yalc add react-on-rails
6161
run: cd spec/dummy && yalc add react-on-rails
6262
- name: Install Node modules with Yarn for dummy app
63-
run: cd spec/dummy && yarn install --no-progress --no-emoji
63+
run: cd spec/dummy && yarn run install:ci
6464
- name: Save dummy app ruby gems to cache
6565
uses: actions/cache@v4
6666
with:
@@ -146,14 +146,14 @@ jobs:
146146
key: dummy-app-webpack-bundle-${{ steps.get-sha.outputs.sha }}-${{ matrix.versions }}
147147
- name: Install Node modules with Yarn
148148
run: |
149-
yarn install --no-progress --no-emoji
149+
yarn run install:ci
150150
sudo yarn global add yalc
151151
- name: yalc publish for react-on-rails
152152
run: yalc publish
153153
- name: yalc add react-on-rails
154154
run: cd spec/dummy && yalc add react-on-rails
155155
- name: Install Node modules with Yarn for dummy app
156-
run: cd spec/dummy && yarn install --no-progress --no-emoji
156+
run: cd spec/dummy && yarn run install:ci
157157
- name: Dummy JS tests
158158
run: |
159159
cd spec/dummy

.github/workflows/package-js-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
run: script/convert
3838
- name: Install Node modules with Yarn for renderer package
3939
run: |
40-
yarn install --no-progress --no-emoji
40+
yarn run install:ci
4141
sudo yarn global add yalc
4242
- name: Run JS unit tests for Renderer package
4343
run: yarn test

.github/workflows/rspec-package-specs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88

99
jobs:
1010
rspec-package-tests:
11+
env:
12+
BUNDLE_FROZEN: ${{ matrix.versions == 'oldest' && 'false' || 'true' }}
1113
strategy:
1214
fail-fast: false
1315
matrix:

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
"node_package/lib"
7171
],
7272
"scripts": {
73+
"install:ci": "yarn install --frozen-lockfile --no-progress --no-emoji",
7374
"test": "jest node_package/tests",
7475
"clean": "rm -rf node_package/lib",
7576
"start": "nps",

spec/dummy/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
},
6767
"scripts": {
6868
"preinstall": "yarn run link-source && yalc add --link react-on-rails",
69+
"install:ci": "yarn install --frozen-lockfile --no-progress --no-emoji",
6970
"link-source": "cd ../.. && yarn run build && yalc publish",
7071
"lint": "cd ../.. && yarn run lint",
7172
"format": "cd ../.. && yarn run nps format",

0 commit comments

Comments
 (0)