Skip to content

Commit 00e09fd

Browse files
beaubydawidof
authored andcommitted
Test against multiple rails versions.
1 parent a084ca8 commit 00e09fd

File tree

2 files changed

+26
-5
lines changed

2 files changed

+26
-5
lines changed

.travis.yml

+13-5
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,30 @@ env:
66
global:
77
- CC_TEST_REPORTER_ID=98c9b3070ea9ac0e8f7afb6570f181506c3a06372b1db5c7deb8e46089fdf132
88
- GIT_COMMITTED_AT=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then git log -1 --pretty=format:%ct; else git log -1 --skip 1 --pretty=format:%ct; fi)
9+
matrix:
10+
- "RAILS_VERSION=4.2.11"
11+
- "RAILS_VERSION=5.0.7.1"
12+
- "RAILS_VERSION=5.1.6.1"
13+
- "RAILS_VERSION=5.2.2"
14+
- "RAILS_VERSION=master"
915
rvm:
10-
- 2.2.2
11-
- 2.3.3
16+
- 2.2.9
17+
- 2.3.8
18+
- 2.6.1
1219
- ruby-head
1320
matrix:
1421
allow_failures:
1522
- rvm: ruby-head
23+
- env: "RAILS_VERSION=master"
1624
before_script:
1725
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
1826
- chmod +x ./cc-test-reporter
1927
- ./cc-test-reporter before-build
2028
after_script:
21-
# Preferably you will run test-reporter on branch update events. But
22-
# if you setup travis to build PR updates only, you don't need to run
29+
# Preferably you will run test-reporter on branch update events. But
30+
# if you setup travis to build PR updates only, you don't need to run
2331
# the line below
2432
- if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi
25-
# In the case where travis is setup to build PR updates only,
33+
# In the case where travis is setup to build PR updates only,
2634
# uncomment the line below
2735
# - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT

Gemfile

+13
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
11
source 'https://rubygems.org'
22

3+
rails_version = ENV['RAILS_VERSION'] || "default"
4+
rails =
5+
case rails_version
6+
when 'master'
7+
{ github: 'rails/rails' }
8+
when 'default'
9+
'>= 5.0'
10+
else
11+
"~> #{ENV['RAILS_VERSION']}"
12+
end
13+
14+
gem 'rails', rails
15+
316
gemspec

0 commit comments

Comments
 (0)