From e2f1ec87029e14a17d0e7ccfce355d14770debc5 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Mon, 12 Aug 2019 22:22:20 +0900 Subject: [PATCH 1/4] Migrate GitHub Actions from Travis CI --- .github/workflows/macos.yml | 15 +++++++++++++++ .github/workflows/ubuntu-rvm.yml | 29 +++++++++++++++++++++++++++++ .github/workflows/ubuntu.yml | 22 ++++++++++++++++++++++ .github/workflows/windows.yml | 22 ++++++++++++++++++++++ 4 files changed, 88 insertions(+) create mode 100644 .github/workflows/macos.yml create mode 100644 .github/workflows/ubuntu-rvm.yml create mode 100644 .github/workflows/ubuntu.yml create mode 100644 .github/workflows/windows.yml diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml new file mode 100644 index 0000000..e161bdd --- /dev/null +++ b/.github/workflows/macos.yml @@ -0,0 +1,15 @@ +name: macos + +on: [push] + +jobs: + build: + runs-on: macos-latest + steps: + - uses: actions/checkout@master + - name: Install dependencies + run: | + gem install bundler --no-document + bundle install + - name: Run test + run: rake diff --git a/.github/workflows/ubuntu-rvm.yml b/.github/workflows/ubuntu-rvm.yml new file mode 100644 index 0000000..b27cfd4 --- /dev/null +++ b/.github/workflows/ubuntu-rvm.yml @@ -0,0 +1,29 @@ +name: ubuntu-rvm + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + ruby: [ 'jruby-9.2.6.0', 'jruby-9.1.17.0', 'ruby-head' ] + steps: + - uses: actions/checkout@master + - name: Set up RVM + run: | + curl -sSL https://get.rvm.io | bash + - name: Set up Ruby + run: | + source $HOME/.rvm/scripts/rvm + rvm install ${{ matrix.ruby }} --binary + rvm --default use ${{ matrix.ruby }} + - name: Install dependencies + run: | + source $HOME/.rvm/scripts/rvm + gem install bundler --no-document + bundle install + - name: Run test + run: | + source $HOME/.rvm/scripts/rvm + rake diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml new file mode 100644 index 0000000..6f08a83 --- /dev/null +++ b/.github/workflows/ubuntu.yml @@ -0,0 +1,22 @@ +name: ubuntu + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + ruby: [ '2.6.x', '2.5.x', '2.4.x', '2.3.x' ] + steps: + - uses: actions/checkout@master + - name: Set up Ruby + uses: actions/setup-ruby@v1 + with: + version: ${{ matrix.ruby }} + - name: Install dependencies + run: | + gem install bundler --no-document + bundle install + - name: Run test + run: rake diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 0000000..fd22991 --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,22 @@ +name: windows + +on: [push] + +jobs: + build: + runs-on: windows-latest + strategy: + matrix: + ruby: [ '2.6.x', '2.5.x', '2.4.x' ] + steps: + - uses: actions/checkout@master + - name: Set up Ruby + uses: actions/setup-ruby@v1 + with: + version: ${{ matrix.ruby }} + - name: Set up Bundler + run: gem install bundler --no-document + - name: Install dependencies + run: bundle install + - name: Run test + run: rake From 387758d45a3a053c1250ade9ca77ccb9b51e92e4 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Mon, 12 Aug 2019 22:27:13 +0900 Subject: [PATCH 2/4] Extracted VERSION constant for gemspec --- forwardable.gemspec | 4 ++-- lib/forwardable.rb | 5 +---- lib/forwardable/version.rb | 5 +++++ 3 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 lib/forwardable/version.rb diff --git a/forwardable.gemspec b/forwardable.gemspec index d722bc1..947f729 100644 --- a/forwardable.gemspec +++ b/forwardable.gemspec @@ -1,8 +1,8 @@ begin - require_relative "lib/forwardable" + require_relative "lib/forwardable/version" rescue LoadError # for Ruby core repository - require_relative "../forwardable" + require_relative "version" end Gem::Specification.new do |spec| diff --git a/lib/forwardable.rb b/lib/forwardable.rb index f5202f9..449c344 100644 --- a/lib/forwardable.rb +++ b/lib/forwardable.rb @@ -110,10 +110,7 @@ # module Forwardable require 'forwardable/impl' - - # Version of +forwardable.rb+ - VERSION = "1.2.0" - FORWARDABLE_VERSION = VERSION + require "forwardable/version" @debug = nil class << self diff --git a/lib/forwardable/version.rb b/lib/forwardable/version.rb new file mode 100644 index 0000000..b0b67a8 --- /dev/null +++ b/lib/forwardable/version.rb @@ -0,0 +1,5 @@ +module Forwardable + # Version of +forwardable.rb+ + VERSION = "1.2.0" + FORWARDABLE_VERSION = VERSION +end From 1b6991e589a502b9538045ed794b6c2788a05c7b Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Mon, 12 Aug 2019 22:28:03 +0900 Subject: [PATCH 3/4] Update spec.files --- forwardable.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forwardable.gemspec b/forwardable.gemspec index 947f729..2a3e637 100644 --- a/forwardable.gemspec +++ b/forwardable.gemspec @@ -16,7 +16,7 @@ Gem::Specification.new do |spec| spec.homepage = "https://github.com/ruby/forwardable" spec.license = "BSD-2-Clause" - spec.files = [".gitignore", ".travis.yml", "Gemfile", "LICENSE.txt", "README.md", "Rakefile", "bin/console", "bin/setup", "forwardable.gemspec", "lib/forwardable.rb", "lib/forwardable/impl.rb"] + spec.files = ["forwardable.gemspec", "lib/forwardable.rb", "lib/forwardable/impl.rb", "lib/forwardable/version.rb"] spec.bindir = "exe" spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } spec.require_paths = ["lib"] From 34d47c708ecf3c1e9128e8009eb3caa6c3bd907f Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Mon, 12 Aug 2019 22:36:55 +0900 Subject: [PATCH 4/4] Removed configuration of Travis CI --- .travis.yml | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a7b4916..0000000 --- a/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -sudo: false -language: ruby -rvm: - - 2.5.1 - - ruby-head -before_install: gem install bundler -v 1.16.2