diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 1e8356d9..712adf9c 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -79,8 +79,6 @@ jobs: env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile - LOCKFILE: '${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile.lock' - LOCKFILE_HASH: hashFiles('${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile.lock') # Workaround b/c upgrading Minitest broke some mocking expectations # having to do with automatic kwarg splatting MT_KWARGS_HACK: 1 @@ -107,20 +105,12 @@ jobs: with: bundler: 2.4.9 ruby-version: ${{ matrix.ruby }} - - run: echo hash=${LOCKFILE_HASH} >> $GITHUB_ENV - - run: echo lockfilepath=${LOCKFILE} >> $GITHUB_ENV - run: ./test/bin/create-fake-js-package-managers ${{ matrix.js_package_manager.installer }} - - run: echo ${{ hashFiles('${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile.lock') }} - - run: echo ${{ hashFiles('/home/runner/work/react-rails/react-rails/gemfiles/base.gemfile.lock') }} - - run: echo ${{ hashFiles(${{ LOCKFILE }}) }} - - run: echo ${{ hashFiles(${{ env.lockfilepath }}) }} - - run: echo '${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile.lock' - - run: ls -l '${{ github.workspace }}/gemfiles/' - name: Save dummy app ruby gems to cache uses: actions/cache@v3 with: path: test/dummy/vendor/bundle - key: dummy-app-gem-cache-${{ env.hash }} + key: dummy-app-gem-cache-${{ hashFiles(format('{0}/gemfiles/{1}.gemfile.lock', github.workspace, matrix.gemfile)) }} - name: Install Ruby Gems for dummy app 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 - run: cd test/dummy && yalc add react_ujs && ${{ matrix.js_package_manager.installer }} install