Fix CI config by ensuring deployment unset before installing dependencies#69
Fix CI config by ensuring deployment unset before installing dependencies#69
Conversation
…loyment unset before installing dependencies
There was a problem hiding this comment.
Pull request overview
Updates GitHub Actions Ruby workflows to avoid Bundler “deployment” mode interfering with dependency installation by explicitly unsetting it and running bundle install manually.
Changes:
- Disabled
ruby/setup-ruby’sbundler-cache: truebehavior in CI and Brakeman workflows. - Added steps to
bundle config unset deploymentand then runbundle install.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| .github/workflows/ci.yml | Replaces bundler-cache with explicit Bundler config unset + manual bundle install before running specs. |
| .github/workflows/brakeman.yml | Replaces bundler-cache with explicit Bundler config unset + manual bundle install before installing/running Brakeman. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.github/workflows/brakeman.yml
Outdated
| bundler-cache: true | ||
| # bundler-cache: true | ||
|
|
||
| - name: unset deployment |
There was a problem hiding this comment.
Step names in this workflow are capitalized (e.g., "Set up Ruby…", "Install dependencies"), but this new step is not. Rename it to match the existing naming style for consistency and readability.
| - name: unset deployment | |
| - name: Unset deployment |
.github/workflows/brakeman.yml
Outdated
| # bundler-cache: true | ||
|
|
There was a problem hiding this comment.
There is trailing whitespace on these lines (after the commented bundler-cache line and on the blank line). Consider removing it to avoid lint noise and keep diffs clean.
| # bundler-cache: true | |
| # bundler-cache: true |
.github/workflows/ci.yml
Outdated
| - name: unset deployment | ||
| run: bundle config unset deployment | ||
|
|
||
| - name: Install dependencies | ||
| run: bundle install |
There was a problem hiding this comment.
Gemfile.lock pins Bundler via BUNDLED WITH 2.2.29, but this workflow no longer uses bundler-cache and doesn’t explicitly install/pin a Bundler version. Depending on the runner’s default Bundler, bundle install can fail with a Bundler version mismatch. Consider explicitly installing/pinning the Bundler version (or configuring ruby/setup-ruby to use the lockfile’s Bundler) before running bundle install.
.github/workflows/ci.yml
Outdated
| bundler-cache: true | ||
| # bundler-cache: true | ||
|
|
||
| - name: unset deployment |
There was a problem hiding this comment.
Step names in this workflow are capitalized (e.g., "Set up Ruby…", "Install dependencies", "Run tests"), but this new step is not. Rename it to match the existing naming style for consistency and readability.
| - name: unset deployment | |
| - name: Unset deployment |
.github/workflows/brakeman.yml
Outdated
| - name: unset deployment | ||
| run: bundle config unset deployment | ||
|
|
||
| - name: Install dependencies | ||
| run: bundle install |
There was a problem hiding this comment.
Gemfile.lock pins Bundler via BUNDLED WITH 2.2.29, but this workflow no longer uses bundler-cache and doesn’t explicitly install/pin a Bundler version. Depending on the runner’s default Bundler, bundle install can fail with a Bundler version mismatch. Consider explicitly installing/pinning the Bundler version (or configuring ruby/setup-ruby to use the lockfile’s Bundler) before running bundle install.
… false and restoring bundler-cache
This pull request updates the GitHub Actions workflows for both Brakeman and CI jobs to improve dependency installation reliability. The main change is replacing the use of
bundler-cache: truewith explicit steps to unset the bundler deployment mode and manually install dependencies.Dependency installation process updates:
bundler-cache: trueand added steps to unset the bundler deployment configuration and runbundle installmanually in both.github/workflows/brakeman.ymland.github/workflows/ci.yml. This helps avoid issues with cached gems and deployment-specific bundler settings. [1] [2]