-
-
Notifications
You must be signed in to change notification settings - Fork 74
/
.travis.yml
63 lines (55 loc) · 1.55 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
env:
matrix:
- COV=false
global:
- CC_TEST_REPORTER_ID=8ba417e8bf62f355529f4f11b42114f99e073459a7424e79845d64ab95e52b76
- 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)
dist: bionic
language: ruby
cache:
bundler: true
directories:
- /home/travis/.rvm/
before_install:
- gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
- gem update --system
- gem install bundler rubocop-mhenrixon
- >
if [[ "${COV}" = "true" ]]; then
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter;
chmod +x ./cc-test-reporter;
fi;
install:
- bundle install -j$(nproc) -r$(nproc)
before_script:
- env
- >
if [[ "${COV}" = "true" ]]; then
./cc-test-reporter before-build;
fi;
script:
- if [[ "${COV}" = "true" ]]; then bin/reek .; fi;
- if [[ "${COV}" = "true" ]]; then bin/rubocop -P .; fi;
- bin/rspec spec;
after_script:
- >
if [[ "${COV}" = "true" ]]; then
./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT;
fi;
rvm:
- 2.5.7
- 2.7.0
matrix:
fast_finish: true
include:
- rvm: 2.6.5
env: COV=true
notifications:
email:
recipients:
- mikael@mhenrixon.com
slack:
rooms:
secure: B05ZUPdHrhxVnz7Mlpd5KhFH2bdE9ykFRgqLFHV3EcdyWKm85PPgbfl4cNPTFXHHhzk/5E9h5hwEXpicJYSsq6lhU8i3WesidrA+GHzrpesowTHpvtJMxIjsE1Tavug0xQs/bca72yN2t51m8UiD1scOSIuvSOCNkuKkn3+rSIo=
on_failure: always
on_success: change