Skip to content

Commit

Permalink
install bundler on ruby 2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
zvkemp committed Dec 14, 2020
1 parent 616fb87 commit ceeac7f
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 10 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/build.yml
Expand Up @@ -15,7 +15,7 @@ env:
COVERAGE: 'true'
COVERAGE_DIR: "${{ github.workspace }}/coverage"
CORE_COVERAGE_DIR: "${{ github.workspace }}/skylight-core/coverage"
CONFIG_DIGEST: 49bcb4e8486dc4652bd3bbb353b6a28b612b9be900b1ffb522b61b73067bad1c
CONFIG_DIGEST: 31834b11c5a484cd81e6bcd88983b601979e92f6489e1f4aa2723e934948e35a
'on':
pull_request: {}
push:
Expand Down Expand Up @@ -519,6 +519,8 @@ jobs:
path: "${{ github.workspace }}/vendor/bundle"
key: "${{ runner.os }}-gems-2.4-rails-5.2.x"
restore-keys: "${{ runner.os }}-gems-2.4-"
- name: install bundler
run: gem install bundler
- name: bundle install
run: |
bundle install
Expand Down Expand Up @@ -742,6 +744,8 @@ jobs:
path: "${{ github.workspace }}/vendor/bundle"
key: "${{ runner.os }}-gems-2.4-sinatra-1.4.x"
restore-keys: "${{ runner.os }}-gems-2.4-"
- name: install bundler
run: gem install bundler
- name: bundle install
run: |
bundle install
Expand Down Expand Up @@ -850,6 +854,8 @@ jobs:
path: "${{ github.workspace }}/vendor/bundle"
key: "${{ runner.os }}-gems-2.4-sinatra-2.0.x"
restore-keys: "${{ runner.os }}-gems-2.4-"
- name: install bundler
run: gem install bundler
- name: bundle install
run: |
bundle install
Expand Down Expand Up @@ -1013,6 +1019,8 @@ jobs:
path: "${{ github.workspace }}/vendor/bundle"
key: "${{ runner.os }}-gems-2.4-grape"
restore-keys: "${{ runner.os }}-gems-2.4-"
- name: install bundler
run: gem install bundler
- name: bundle install
run: |
bundle install
Expand Down
31 changes: 22 additions & 9 deletions lib/tasks/workflow.rake
Expand Up @@ -370,15 +370,20 @@ module WorkflowConfigGenerator
end

def install_bundler_step
return unless needs_bundler_117?

{
name: "install bundler 1.17.3",
run: <<~RUN
gem uninstall bundler
gem install bundler:1.17.3
RUN
}
if needs_bundler_117?
{
name: "install bundler 1.17.3",
run: <<~RUN
gem uninstall bundler
gem install bundler:1.17.3
RUN
}
elsif ruby_24?
{
name: "install bundler",
run: "gem install bundler"
}
end
end

def install_bundler_dependencies_step
Expand Down Expand Up @@ -418,6 +423,10 @@ module WorkflowConfigGenerator
gemfile == "rails-5.1.x"
end

def ruby_24?
ruby_version.to_s == "2.4"
end

def run_tests_disabled_agent_step
{
name: "Run tests (agent disabled)",
Expand Down Expand Up @@ -468,6 +477,10 @@ module WorkflowConfigGenerator
config.fetch(:gemfile)
end

def ruby_version
config.fetch(:ruby_version)
end

def gemfile_path
"${{ github.workspace }}/gemfiles/Gemfile.#{gemfile}"
end
Expand Down

0 comments on commit ceeac7f

Please sign in to comment.