Skip to content

Commit 267bf50

Browse files
authored
Merge pull request #179 from emilioforrer/github-actions
Run tests on Github Actions
2 parents 49668d1 + 8583080 commit 267bf50

File tree

4 files changed

+95
-0
lines changed

4 files changed

+95
-0
lines changed

.github/workflows/build.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7+
8+
name: build
9+
10+
on: [push, pull_request]
11+
12+
jobs:
13+
test:
14+
runs-on: ubuntu-20.04
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
ruby:
19+
- 3.0
20+
- 2.7
21+
- 2.6
22+
- 2.5
23+
- jruby-9.2.17.0
24+
gemfile:
25+
- Gemfile-4-2-stable
26+
- Gemfile-5-0-stable
27+
- Gemfile-5-1-sprockets-3
28+
- Gemfile-5-2-sprockets-3
29+
- Gemfile-5-2-sprockets-4
30+
- Gemfile-6-0-sprockets-3
31+
- Gemfile-6-0-sprockets-4
32+
- Gemfile-6-1-sprockets-3
33+
- Gemfile-6-1-sprockets-4
34+
exclude:
35+
- gemfile: Gemfile-4-2-stable
36+
ruby: 2.7
37+
- gemfile: Gemfile-4-2-stable
38+
ruby: 3.0
39+
- gemfile: Gemfile-5-0-stable
40+
ruby: 3.0
41+
- gemfile: Gemfile-5-1-sprockets-3
42+
ruby: 3.0
43+
- gemfile: Gemfile-5-2-sprockets-3
44+
ruby: 3.0
45+
- gemfile: Gemfile-5-1-sprockets-4
46+
ruby: 3.0
47+
- gemfile: Gemfile-5-2-sprockets-4
48+
ruby: 3.0
49+
50+
env:
51+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}
52+
steps:
53+
- uses: actions/checkout@v2
54+
- uses: ruby/setup-ruby@v1
55+
with:
56+
ruby-version: ${{ matrix.ruby }}
57+
bundler-cache: true
58+
- run: bundle exec rake

.travis.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ rvm:
88
- jruby-9.2.17.0
99
- jruby-head
1010
gemfile:
11+
- gemfiles/Gemfile-4-2-stable
12+
- gemfiles/Gemfile-5-0-stable
1113
- gemfiles/Gemfile-5-1-sprockets-3
1214
- gemfiles/Gemfile-5-1-sprockets-4
1315
- gemfiles/Gemfile-5-2-sprockets-3
@@ -16,6 +18,7 @@ gemfile:
1618
- gemfiles/Gemfile-6-0-sprockets-4
1719
- gemfiles/Gemfile-6-1-sprockets-3
1820
- gemfiles/Gemfile-6-1-sprockets-4
21+
1922
matrix:
2023
exclude:
2124
- rvm: 3.0.1
@@ -53,8 +56,12 @@ matrix:
5356
- rvm: jruby-head
5457
gemfile: gemfiles/Gemfile-6-0-sprockets-3
5558

59+
- rvm: jruby-9.2.17.0
60+
gemfile: gemfiles/Gemfile-4-2-stable
61+
5662
allow_failures:
5763
- rvm: ruby-head
5864
- rvm: jruby-head
65+
5966
notifications:
6067
email: false

gemfiles/Gemfile-4-2-stable

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
source 'https://rubygems.org'
2+
3+
gemspec path: '..'
4+
5+
gem 'rails', git: 'https://github.com/mathieujobin/rails', branch: 'rails4-2-bundler-2'
6+
7+
platform :ruby do
8+
gem 'therubyracer'
9+
gem 'redcarpet'
10+
end
11+
12+
platform :jruby do
13+
gem 'therubyrhino'
14+
gem 'kramdown'
15+
end

gemfiles/Gemfile-5-0-stable

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
source 'https://rubygems.org'
2+
3+
gemspec path: '..'
4+
5+
gem 'rails', '~> 5.0.7'
6+
7+
platform :ruby do
8+
gem 'therubyracer'
9+
gem 'redcarpet'
10+
end
11+
12+
platform :jruby do
13+
gem 'therubyrhino'
14+
gem 'kramdown'
15+
end

0 commit comments

Comments
 (0)