From ba9e71c195cadabb5051b7f88255085a846ee77e Mon Sep 17 00:00:00 2001 From: Jason Frey Date: Thu, 24 Jul 2025 16:32:05 -0400 Subject: [PATCH] Add printing of the lockfile after installation Closes #783 --- .github/workflows/test.yml | 12 ++++++++++++ dist/index.js | 5 +++++ index.js | 5 +++++ 3 files changed, 22 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b07c794..d9371a3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -240,6 +240,18 @@ jobs: ruby-version: '2.6' - run: ruby -v + testNoGemfileWithBundlerCache: + name: "Test with no Gemfile but with bundler-cache" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: rm Gemfile + - uses: ./ + with: + ruby-version: '2.6' + bundler-cache: true + - run: ruby -v + testLatestRubygemsVersion: name: "Test rubygems: latest on ${{ matrix.ruby }}" runs-on: ubuntu-latest diff --git a/dist/index.js b/dist/index.js index d82a17d..3c983d4 100644 --- a/dist/index.js +++ b/dist/index.js @@ -85350,6 +85350,11 @@ async function setupRuby(options = {}) { if (inputs['bundler-cache'] === 'true') { await common.time('bundle install', async () => bundler.bundleInstall(gemfile, lockFile, platform, engine, version, bundlerVersion, inputs['cache-version'])) + + if (fs.existsSync(lockFile)) { + await core.group(`Print lockfile`, async () => + await exec.exec('cat', [lockFile])) + } } core.setOutput('ruby-prefix', rubyPrefix) diff --git a/index.js b/index.js index 62e46fe..d783d68 100644 --- a/index.js +++ b/index.js @@ -99,6 +99,11 @@ export async function setupRuby(options = {}) { if (inputs['bundler-cache'] === 'true') { await common.time('bundle install', async () => bundler.bundleInstall(gemfile, lockFile, platform, engine, version, bundlerVersion, inputs['cache-version'])) + + if (fs.existsSync(lockFile)) { + await core.group(`Print lockfile`, async () => + await exec.exec('cat', [lockFile])) + } } core.setOutput('ruby-prefix', rubyPrefix)