summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBundlerbot <bot@bundler.io>2020-03-06 11:15:45 +0000
committerBundlerbot <bot@bundler.io>2020-03-06 11:15:45 +0000
commit140b5de76f2e23fc44333d55efb689ad27a81828 (patch)
treec916ffc801a50a5d2126c313ea588118d64f87d3
parentc645636cc8e76a53772e3ab15693ed716132159a (diff)
parentf07db0495e95f7f1f4e090d1f77636b702926607 (diff)
downloadbundler-140b5de76f2e23fc44333d55efb689ad27a81828.tar.gz
Merge #7660
7660: Try to migrate GitHub Actions from Travis CI r=hsbt a=hsbt Fixes #7587 Co-authored-by: Hiroshi SHIBATA <hsbt@ruby-lang.org> Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
-rw-r--r--.github/bors.toml24
-rw-r--r--.github/config.yml2
-rw-r--r--.github/workflows/ubuntu-bundler3.yml38
-rw-r--r--.github/workflows/ubuntu-lint.yml24
-rw-r--r--.github/workflows/ubuntu.yml62
-rw-r--r--.travis.yml83
-rw-r--r--README.md1
-rw-r--r--doc/development/PULL_REQUESTS.md2
-rw-r--r--spec/support/rubygems_ext.rb15
9 files changed, 158 insertions, 93 deletions
diff --git a/.github/bors.toml b/.github/bors.toml
index 4943eaa057..f3e8512fbb 100644
--- a/.github/bors.toml
+++ b/.github/bors.toml
@@ -1,8 +1,28 @@
status = [
- "continuous-integration/travis-ci/push",
"windows (2.4.x)",
"windows (2.5.x)",
- "windows (2.6.x)"
+ "windows (2.6.x)",
+ "ubuntu_lint",
+ "ubuntu (2.3.8, v2.5.2)",
+ "ubuntu (2.3.8, v2.6.14)",
+ "ubuntu (2.3.8, v2.7.10)",
+ "ubuntu (2.3.8, v3.0.6)",
+ "ubuntu (2.3.8, master)",
+ "ubuntu (2.4.9, v2.6.14)",
+ "ubuntu (2.4.9, v2.7.10)",
+ "ubuntu (2.4.9, v3.0.6)",
+ "ubuntu (2.4.9, master)",
+ "ubuntu (2.5.7, v2.7.10)",
+ "ubuntu (2.5.7, v3.0.6)",
+ "ubuntu (2.5.7, master)",
+ "ubuntu (2.6.5, v3.0.6)",
+ "ubuntu (2.6.5, master)",
+ "ubuntu-bundler3 (2.4.9, v3.0.6)",
+ "ubuntu-bundler3 (2.4.9, master)",
+ "ubuntu-bundler3 (2.5.7, v3.0.6)",
+ "ubuntu-bundler3 (2.5.7, master)",
+ "ubuntu-bundler3 (2.6.5, v3.0.6)",
+ "ubuntu-bundler3 (2.6.5, master)"
]
timeout_sec = 14400
diff --git a/.github/config.yml b/.github/config.yml
index 8557d7477b..31ae06970f 100644
--- a/.github/config.yml
+++ b/.github/config.yml
@@ -1,7 +1,7 @@
newPRWelcomeComment: |
Thanks for opening a pull request and helping make Bundler better! Someone from the Bundler team will take a look at your pull request shortly and leave any feedback. Please make sure that your pull request has tests for any changes or added functionality.
- We use Travis CI to test and make sure your change works functionally and uses acceptable conventions, you can review the current progress of Travis CI in the PR status window below.
+ We use GitHub Actions to test and make sure your change works functionally and uses acceptable conventions, you can review the current progress of GitHub Actions in the PR status window below.
If you have any questions or concerns that you wish to ask, feel free to leave a comment in this PR or join our #bundler channel on [Slack](https://slack.bundler.io/).
diff --git a/.github/workflows/ubuntu-bundler3.yml b/.github/workflows/ubuntu-bundler3.yml
new file mode 100644
index 0000000000..fd9281ebc0
--- /dev/null
+++ b/.github/workflows/ubuntu-bundler3.yml
@@ -0,0 +1,38 @@
+name: ubuntu-bundler3
+
+on:
+ pull_request:
+
+ push:
+ branches:
+ - staging
+ - trying
+
+jobs:
+ ubuntu-bundler3:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ ruby: [ 2.4.9, 2.5.7, 2.6.5 ]
+ rgv: [ v3.0.6, master ]
+ env:
+ RGV: ${{ matrix.rgv }}
+ steps:
+ - uses: actions/checkout@v1
+ - name: Setup ruby
+ uses: ruby/setup-ruby@v1
+ with:
+ ruby-version: ${{ matrix.ruby }}
+ - name: Prepare dependencies
+ run: |
+ BUNDLER_SPEC_SUB_VERSION=3.0.0 bin/rake override_version
+ bin/rake spec:parallel_deps
+ - name: Run Test
+ run: bin/parallel_rspec spec
+ - name: Run Test with realworld
+ run: bin/rake spec:realworld
+ env:
+ BUNDLER_SPEC_PRE_RECORDED: 1
+ - name: Run Test with sudo
+ run: bin/rake spec:sudo
+ timeout-minutes: 60
diff --git a/.github/workflows/ubuntu-lint.yml b/.github/workflows/ubuntu-lint.yml
new file mode 100644
index 0000000000..e2ee63d362
--- /dev/null
+++ b/.github/workflows/ubuntu-lint.yml
@@ -0,0 +1,24 @@
+name: ubuntu-lint
+
+on:
+ pull_request:
+
+ push:
+ branches:
+ - staging
+ - trying
+
+jobs:
+ ubuntu_lint:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v1
+ - name: Setup ruby
+ uses: ruby/setup-ruby@v1
+ with:
+ ruby-version: 2.6.5
+ - name: Install Dependencies
+ run: bin/rake spec:deps
+ - name: Run Lint
+ run: bin/rake rubocop check_rvm_integration man:check
+ timeout-minutes: 15
diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml
new file mode 100644
index 0000000000..b8f51095ed
--- /dev/null
+++ b/.github/workflows/ubuntu.yml
@@ -0,0 +1,62 @@
+name: ubuntu
+
+on:
+ pull_request:
+
+ push:
+ branches:
+ - staging
+ - trying
+
+jobs:
+ ubuntu:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ ruby: [ 2.3.8, 2.4.9, 2.5.7, 2.6.5, head ]
+ rgv: [ v2.5.2, v2.6.14, v2.7.10, v3.0.6, master ]
+ exclude:
+ - ruby: 2.4.9
+ rgv: v2.5.2
+ - ruby: 2.5.7
+ rgv: v2.5.2
+ - ruby: 2.5.7
+ rgv: v2.6.14
+ - ruby: 2.6.5
+ rgv: v2.5.2
+ - ruby: 2.6.5
+ rgv: v2.6.14
+ - ruby: 2.6.5
+ rgv: v2.7.10
+ - ruby: head
+ rgv: v2.5.2
+ - ruby: head
+ rgv: v2.6.14
+ - ruby: head
+ rgv: v2.7.10
+ - ruby: head
+ rgv: v3.0.6
+ env:
+ RGV: ${{ matrix.rgv }}
+ steps:
+ - uses: actions/checkout@v1
+ - name: Setup ruby
+ uses: ruby/setup-ruby@v1
+ with:
+ ruby-version: ${{ matrix.ruby }}
+ - name: Prepare dependencies
+ run: |
+ sudo apt-get install graphviz -y
+ bin/rake spec:parallel_deps
+ - name: Run Test
+ run: bin/parallel_rspec spec
+ continue-on-error: ${{ matrix.ruby == 'head' }}
+ - name: Run Test with realworld
+ run: bin/rake spec:realworld
+ env:
+ BUNDLER_SPEC_PRE_RECORDED: 1
+ continue-on-error: ${{ matrix.ruby == 'head' }}
+ - name: Run Test with sudo
+ run: bin/rake spec:sudo
+ continue-on-error: ${{ matrix.ruby == 'head' }}
+ timeout-minutes: 60
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 638d19b6e1..0000000000
--- a/.travis.yml
+++ /dev/null
@@ -1,83 +0,0 @@
-language: ruby
-dist: bionic
-script:
- - bin/parallel_rspec spec
- - bin/rake spec:sudo
- - BUNDLER_SPEC_PRE_RECORDED=1 bin/rake spec:realworld
-
-before_script:
- - travis_retry bin/rake override_version
- - travis_retry bin/rake spec:parallel_deps
- - if [ "$BUNDLER_SPEC_SUB_VERSION" = "" ];
- then
- travis_retry sudo apt-get install graphviz -y;
- fi
-
-branches:
- only:
- - master
- - staging
- - trying
- - /.+-dev$/
- - /.+-stable$/
-
-cache:
- directories:
- - tmp/rubocop
-
-notifications:
- slack:
- on_success: change
- on_failure: always
- rooms:
- - secure: JxBi7DDJGkIF/7f/FSN/HUHpvV4EKfQccZHTPd1b2pNJn3GXo6u+tNVbAw2WjxYzPyPQI3ZcYBCU9SEXp/i7VmG8uMzh8Kyildw+miSKYKVb90uYqcsXWzbxwyNBgJLvyDkzST45H5lgnyAicee3WkFes/WDZikIajbH7ztdb04=
-
-rvm:
- - 2.6.5
- - 2.5.7
- - 2.4.9
-
-stages:
- - linting
- - test
-
-env:
- # We need to know if changes to rubygems will break bundler on release
- - RGV=master BUNDLER_SPEC_SUB_VERSION=3.0.0
- - RGV=master
- # Test the latest rubygems release with all of our supported rubies
- - RGV=v3.0.6 BUNDLER_SPEC_SUB_VERSION=3.0.0
- - RGV=v3.0.6
-
-jobs:
- include:
- - rvm: 2.6.5
- script: bin/rake rubocop check_rvm_integration man:check
- stage: linting
- # Ruby 2.3 also tested in 2.x mode
- - rvm: 2.3.8
- env: RGV=master
- stage: test
- - rvm: 2.3.8
- env: RGV=v3.0.6
- stage: test
- # Ruby 2.5, Rubygems 2.7
- - rvm: 2.5.7
- env: RGV=v2.7.10
- stage: test
- # Ruby 2.4, Rubygems 2.6
- - rvm: 2.4.9
- env: RGV=v2.6.14
- stage: test
- # Ruby 2.3, Rubygems 2.5
- - rvm: 2.3.8
- env: RGV=v2.5.2
- stage: test
- # Ruby-head (we want to know how we're doing, but not fail the build)
- - rvm: ruby-head
- env: RGV=master
- stage: test
-
- allow_failures:
- - rvm: ruby-head
- env: RGV=master
diff --git a/README.md b/README.md
index 406300ae32..7df7e6651d 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,4 @@
[![Version ](https://img.shields.io/gem/v/bundler.svg?style=flat)](https://rubygems.org/gems/bundler)
-[![Build Status](https://img.shields.io/travis/rubygems/bundler/master.svg?style=flat)](https://travis-ci.org/rubygems/bundler)
[![Inline docs ](https://inch-ci.org/github/rubygems/bundler.svg?style=flat)](https://inch-ci.org/github/rubygems/bundler)
[![Slack ](https://bundler-slackin.herokuapp.com/badge.svg)](https://bundler-slackin.herokuapp.com)
diff --git a/doc/development/PULL_REQUESTS.md b/doc/development/PULL_REQUESTS.md
index 313a885033..09428f057f 100644
--- a/doc/development/PULL_REQUESTS.md
+++ b/doc/development/PULL_REQUESTS.md
@@ -8,7 +8,7 @@ Before you submit a pull request, please remember to do the following:
## Code formatting
-Make sure the code formatting and styling adheres to the guidelines. We use RuboCop for this. Lack of formatting adherence will result in automatic Travis build failures.
+Make sure the code formatting and styling adheres to the guidelines. We use RuboCop for this. Lack of formatting adherence will result in automatic GitHub Actions build failures.
$ bin/rubocop -a
diff --git a/spec/support/rubygems_ext.rb b/spec/support/rubygems_ext.rb
index 5299a7b447..62e2274fbe 100644
--- a/spec/support/rubygems_ext.rb
+++ b/spec/support/rubygems_ext.rb
@@ -23,7 +23,8 @@ module Spec
"rake" => "13.0.1",
"builder" => "~> 3.2",
# ruby-graphviz is used by the viz tests
- "ruby-graphviz" => ">= 0.a",
+ # for >= Ruby 2.3
+ "ruby-graphviz" => "1.2.4",
}
extend self
@@ -105,10 +106,14 @@ module Spec
end
def install_gems(gems)
- deps = gems.map {|name, req| "'#{name}:#{req}'" }.join(" ")
- gem = ENV["GEM_COMMAND"] || "#{Gem.ruby} -S gem --backtrace"
- cmd = "#{gem} install #{deps} --no-document --conservative"
- system(cmd) || raise("Installing gems #{deps} for the tests to use failed!")
+ require "rubygems/dependency_installer"
+
+ gems.each do |name, req|
+ dependency = Gem::Dependency.new(name, req)
+ next unless dependency.matching_specs.empty?
+
+ Gem::DependencyInstaller.new(:document => false).install(dependency)
+ end
end
end
end