Skip to content

Commit 9f899dc

Browse files
authored
Merge pull request #3 from ruby/actions
Migrate GitHub Actions from Travis CI
2 parents b8115f4 + 34d47c7 commit 9f899dc

File tree

8 files changed

+97
-13
lines changed

8 files changed

+97
-13
lines changed

.github/workflows/macos.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: macos
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: macos-latest
8+
steps:
9+
- uses: actions/checkout@master
10+
- name: Install dependencies
11+
run: |
12+
gem install bundler --no-document
13+
bundle install
14+
- name: Run test
15+
run: rake

.github/workflows/ubuntu-rvm.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: ubuntu-rvm
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
ruby: [ 'jruby-9.2.6.0', 'jruby-9.1.17.0', 'ruby-head' ]
11+
steps:
12+
- uses: actions/checkout@master
13+
- name: Set up RVM
14+
run: |
15+
curl -sSL https://get.rvm.io | bash
16+
- name: Set up Ruby
17+
run: |
18+
source $HOME/.rvm/scripts/rvm
19+
rvm install ${{ matrix.ruby }} --binary
20+
rvm --default use ${{ matrix.ruby }}
21+
- name: Install dependencies
22+
run: |
23+
source $HOME/.rvm/scripts/rvm
24+
gem install bundler --no-document
25+
bundle install
26+
- name: Run test
27+
run: |
28+
source $HOME/.rvm/scripts/rvm
29+
rake

.github/workflows/ubuntu.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: ubuntu
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
ruby: [ '2.6.x', '2.5.x', '2.4.x', '2.3.x' ]
11+
steps:
12+
- uses: actions/checkout@master
13+
- name: Set up Ruby
14+
uses: actions/setup-ruby@v1
15+
with:
16+
version: ${{ matrix.ruby }}
17+
- name: Install dependencies
18+
run: |
19+
gem install bundler --no-document
20+
bundle install
21+
- name: Run test
22+
run: rake

.github/workflows/windows.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: windows
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: windows-latest
8+
strategy:
9+
matrix:
10+
ruby: [ '2.6.x', '2.5.x', '2.4.x' ]
11+
steps:
12+
- uses: actions/checkout@master
13+
- name: Set up Ruby
14+
uses: actions/setup-ruby@v1
15+
with:
16+
version: ${{ matrix.ruby }}
17+
- name: Set up Bundler
18+
run: gem install bundler --no-document
19+
- name: Install dependencies
20+
run: bundle install
21+
- name: Run test
22+
run: rake

.travis.yml

Lines changed: 0 additions & 6 deletions
This file was deleted.

forwardable.gemspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
begin
2-
require_relative "lib/forwardable"
2+
require_relative "lib/forwardable/version"
33
rescue LoadError
44
# for Ruby core repository
5-
require_relative "../forwardable"
5+
require_relative "version"
66
end
77

88
Gem::Specification.new do |spec|
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
1616
spec.homepage = "https://github.com/ruby/forwardable"
1717
spec.license = "BSD-2-Clause"
1818

19-
spec.files = [".gitignore", ".travis.yml", "Gemfile", "LICENSE.txt", "README.md", "Rakefile", "bin/console", "bin/setup", "forwardable.gemspec", "lib/forwardable.rb", "lib/forwardable/impl.rb"]
19+
spec.files = ["forwardable.gemspec", "lib/forwardable.rb", "lib/forwardable/impl.rb", "lib/forwardable/version.rb"]
2020
spec.bindir = "exe"
2121
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
2222
spec.require_paths = ["lib"]

lib/forwardable.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,7 @@
110110
#
111111
module Forwardable
112112
require 'forwardable/impl'
113-
114-
# Version of +forwardable.rb+
115-
VERSION = "1.2.0"
116-
FORWARDABLE_VERSION = VERSION
113+
require "forwardable/version"
117114

118115
@debug = nil
119116
class << self

lib/forwardable/version.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module Forwardable
2+
# Version of +forwardable.rb+
3+
VERSION = "1.2.0"
4+
FORWARDABLE_VERSION = VERSION
5+
end

0 commit comments

Comments
 (0)