Skip to content

Commit

Permalink
[WIP] See if we can avoid gemfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
sambostock committed Feb 2, 2024
1 parent cc23bd8 commit 24fb78c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }} | Rails ${{ matrix.rails }} | Gemfile ${{ matrix.gemfile }}
name: Ruby ${{ matrix.ruby }} | Rails ${{ matrix.rails }}
continue-on-error: ${{ matrix.rails == 'edge' }}
services:
redis:
Expand All @@ -17,7 +17,6 @@ jobs:
ruby: ["2.6", "2.7", "3.0", "3.1", "3.2", "3.3"]
rails:
["~> 5.2.0", "~> 6.0.0", "~> 6.1.0", "~> 7.0.0", "~> 7.1.0", "edge"]
gemfile: [rails_gems]
exclude:
- ruby: "2.6"
rails: "~> 7.0.0"
Expand Down Expand Up @@ -55,9 +54,7 @@ jobs:
include:
- ruby: head
rails: "edge"
gemfile: rails_gems
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
RAILS_GEMS_REQUIREMENTS: ${{ matrix.rails }}
steps:
- name: Check out code
Expand Down
6 changes: 4 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ gemspec
gem "sidekiq"
gem "resque"

if defined?(@rails_gems_requirements) && @rails_gems_requirements
if (rails_gems_requirements = ENV["RAILS_GEMS_REQUIREMENTS"])
rails_gems_requirements = { github: "rails/rails", branch: "main" } if rails_gems_requirements == "edge"

# We avoid the `gem "..."` syntax here so Dependabot doesn't try to update these gems.
[
"activejob",
"activerecord",
].each { |name| gem name, @rails_gems_requirements }
].each { |name| gem name, rails_gem_requirements }
else
# gem "activejob" # Set in gemspec
gem "activerecord"
Expand Down
6 changes: 0 additions & 6 deletions gemfiles/rails_gems.gemfile

This file was deleted.

0 comments on commit 24fb78c

Please sign in to comment.