Skip to content

Commit a7a8e1b

Browse files
committed
wip
1 parent 4bcc2d7 commit a7a8e1b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/ruby.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ jobs:
7979
env:
8080
# $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
8181
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
82+
LOCKFILE: '${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile.lock'
83+
LOCKFILE_HASH: hashFiles('${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile.lock')
8284
# Workaround b/c upgrading Minitest broke some mocking expectations
8385
# having to do with automatic kwarg splatting
8486
MT_KWARGS_HACK: 1
@@ -105,17 +107,20 @@ jobs:
105107
with:
106108
bundler: 2.4.9
107109
ruby-version: ${{ matrix.ruby }}
110+
- run: echo hash=${LOCKFILE_HASH} >> $GITHUB_ENV
111+
- run: echo lockfilepath=${LOCKFILE} >> $GITHUB_ENV
108112
- run: ./test/bin/create-fake-js-package-managers ${{ matrix.js_package_manager.installer }}
109113
- run: echo ${{ hashFiles('${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile.lock') }}
110114
- run: echo ${{ hashFiles('/home/runner/work/react-rails/react-rails/gemfiles/base.gemfile.lock') }}
111-
- run: echo ${{ hashFiles('test/dummy/yarn.lock') }}
115+
- run: echo ${{ hashFiles(${{ LOCKFILE }}) }}
116+
- run: echo ${{ hashFiles(${{ env.lockfilepath }}) }}
112117
- run: echo '${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile.lock'
113118
- run: ls -l '${{ github.workspace }}/gemfiles/'
114119
- name: Save dummy app ruby gems to cache
115120
uses: actions/cache@v3
116121
with:
117122
path: test/dummy/vendor/bundle
118-
key: dummy-app-gem-cache-${{ hashFiles('${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile.lock') }}
123+
key: dummy-app-gem-cache-${{ env.hash }}
119124
- name: Install Ruby Gems for dummy app
120125
run: bundle lock --add-platform 'x86_64-linux' && bundle check --path=test/dummy/vendor/bundle || bundle _2.4.9_ install --frozen --path=test/dummy/vendor/bundle --jobs=4 --retry=3
121126
- run: cd test/dummy && yalc add react_ujs && ${{ matrix.js_package_manager.installer }} install

0 commit comments

Comments
 (0)