Skip to content

Commit

Permalink
name
Browse files Browse the repository at this point in the history
  • Loading branch information
adamstegman committed Jan 4, 2024
1 parent 38dbc17 commit 60f79bc
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
26 changes: 14 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ _references:
- "3.2.2"
- "3.1.4"
- "3.0.6"
rails_versions: &rails_versions
rails-version:
- "~> 7.1.0"
- "~> 7.0.0"
- "~> 6.1.0"
rails_version_prefixess: &rails_version_prefixes
rails-version-prefix:
- "7.1"
- "7.0"
- "6.1"
- "main"

orbs:
Expand All @@ -22,14 +22,14 @@ jobs:
parameters:
ruby-version:
type: string
rails-version:
rails-version-prefix:
type: string

executor:
name: ruby/default
tag: <<parameters.ruby-version>>
environment:
RAILS_VERSION: <<parameters.rails-version>>
RAILS_VERSION_PREFIX: <<parameters.rails-version-prefix>>
steps:
- checkout
- ruby/install-deps:
Expand All @@ -42,12 +42,12 @@ jobs:
- ruby/rspec-test
test-ruby-head:
parameters:
rails-version:
rails-version-prefix:
type: string
docker:
- image: cimg/base:stable
environment:
RAILS_VERSION: <<parameters.rails-version>>
RAILS_VERSION: <<parameters.rails-version-prefix>>
steps:
- checkout
- ruby/install:
Expand Down Expand Up @@ -83,14 +83,16 @@ workflows:
test:
jobs:
- test:
name: "test-ruby-<<matrix.ruby-version>>-rails-<<matrix.rails-version-prefix>>"
matrix:
parameters:
<<: *ruby_versions
<<: *rails_versions
<<: *rails_version_prefixes
exclude:
- ruby-version: 3.0.6
rails-version: main
rails-version-prefix: main
- test-ruby-head:
name: "test-ruby-head-rails-<<matrix.rails-version-prefix>>"
matrix:
parameters:
<<: *rails_versions
<<: *rails_version_prefixes
12 changes: 6 additions & 6 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ source 'https://rubygems.org'
gemspec

# Lock Rails down in the matrix build, but not by default
rails_version = ENV.fetch("RAILS_VERSION", nil)
if rails_version == "main"
rails_version_prefix = ENV.fetch("RAILS_VERSION_PREFIX", nil)
if rails_version_prefix == "main"
gem "activesupport", github: "rails/rails", branch: "main"
gem "activerecord", github: "rails/rails", branch: "main"
gem "railties", github: "rails/rails", branch: "main"
elsif rails_version
gem "activesupport", rails_version
gem "activerecord", rails_version
gem "railties", rails_version
elsif rails_version_prefix
gem "activesupport", "~> #{rails_version_prefix}.0"
gem "activerecord", "~> #{rails_version_prefix}.0"
gem "railties", "~> #{rails_version_prefix}.0"
end

0 comments on commit 60f79bc

Please sign in to comment.