forked from wallaby-rails/wallaby-view
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
41 lines (41 loc) · 1.4 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
language: ruby
cache: bundler
rvm:
- 2.4
- 2.5
- 2.6
- 2.7
gemfile:
- gemfiles/Gemfile.rails-4.2
- gemfiles/Gemfile.rails-5.0
- gemfiles/Gemfile.rails-5.1
- gemfiles/Gemfile.rails-5.2
- gemfiles/Gemfile.rails-6.0
- gemfiles/Gemfile.rails-6.1
matrix:
exclude:
- rvm: 2.4
gemfile: gemfiles/Gemfile.rails-6.1
- rvm: 2.4
gemfile: gemfiles/Gemfile.rails-6.0
- rvm: 2.7
gemfile: gemfiles/Gemfile.rails-4.2
env:
global:
- CC_TEST_REPORTER_ID=9ddd85ddd2d59e4eddd860b45d5416283463d27ef531ef901051c2960697208b
before_install:
# Rails 4.2 has dependency on bundler < 2 >= 1.3.0
# @see https://docs.travis-ci.com/user/languages/ruby/#bundler-20
- gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true
- gem install bundler -v '< 2'
script:
- bundle exec rubocop
- RAILS_ENV=test bundle exec rake --trace test
before_script:
# setup code climate test coverage only for `master` branch
- if [ "$TRAVIS_BRANCH" = "master" ]; then curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter; fi
- if [ "$TRAVIS_BRANCH" = "master" ]; then chmod +x ./cc-test-reporter; fi
- if [ "$TRAVIS_BRANCH" = "master" ]; then ./cc-test-reporter before-build; fi
after_script:
# send code climate the test coverage
- if [ "$TRAVIS_BRANCH" = "master" ]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi