Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support any Rails branch in CI #1172

Merged
merged 1 commit into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ WORKDIR $WORKDIR

COPY . $WORKDIR

RUN RAILS_MAIN=1 bundle install --jobs `expr $(cat /proc/cpuinfo | grep -c "cpu cores") - 1` --retry 3
RUN RAILS_BRANCH=7-2-stable bundle install --jobs `expr $(cat /proc/cpuinfo | grep -c "cpu cores") - 1` --retry 3

CMD ["sh"]
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ gem "msgpack", ">= 1.7.0"

if ENV["RAILS_SOURCE"]
gemspec path: ENV["RAILS_SOURCE"]
elsif ENV["RAILS_MAIN"]
gem "rails", github: "rails/rails", branch: 'main'
elsif ENV["RAILS_BRANCH"]
gem "rails", github: "rails/rails", branch: ENV["RAILS_BRANCH"]
else
# Need to get rails source because the gem doesn't include tests
version = ENV["RAILS_VERSION"] || begin
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
ci:
environment:
- ACTIVERECORD_UNITTEST_HOST=sqlserver
- RAILS_MAIN=1
- RAILS_BRANCH=7-2-stable
build:
context: .
dockerfile: Dockerfile.ci
Expand Down
Loading