-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
74 lines (74 loc) · 1.91 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
64
65
66
67
68
69
70
71
72
73
74
dist: trusty
os: linux
branches:
only:
- master
language: ruby
cache: bundler
env:
global:
- CI_NODE_TOTAL=12
matrix:
fast_finish: true
include:
- rvm: 2.3.0
env: CI_NODE_INDEX=1
- rvm: 2.3.8
env: CI_NODE_INDEX=2
- rvm: 2.4.0
env: CI_NODE_INDEX=3
- rvm: 2.4.10
env: CI_NODE_INDEX=4
- rvm: 2.5.0
env: CI_NODE_INDEX=5
- rvm: 2.5.4
env: CI_NODE_INDEX=6
- rvm: 2.5.8
env: CI_NODE_INDEX=7
- rvm: 2.6.0
env: CI_NODE_INDEX=8
- rvm: 2.6.4
env: CI_NODE_INDEX=9
- rvm: 2.6.6
env: CI_NODE_INDEX=10
- rvm: 2.7.0
env: CI_NODE_INDEX=11
- rvm: 2.7.1
env: CI_NODE_INDEX=12
before_install:
- gem update --system
- gem install bundler
- pip install --user awscli
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
before_script:
- ./cc-test-reporter before-build
script:
- bundle exec rake
- |
for i in `seq 0 9`
do
BUNDLE_GEMFILE=gemfiles/rspec_3_$i.gemfile bundle install
BUNDLE_GEMFILE=gemfiles/rspec_3_$i.gemfile bundle exec rspec spec
done
after_script:
- |
if [[ "$TRAVIS_TEST_RESULT" == 0 ]]
then
./cc-test-reporter format-coverage --input-type simplecov --output /var/tmp/coverage/codeclimate.$CI_NODE_INDEX.json ./coverage/.resultset.json
fi
- |
if [[ "$TRAVIS_TEST_RESULT" == 0 ]]
then
aws s3 sync /var/tmp/coverage/ "s3://avmnu-sng/rspec-tap-formatters/$TRAVIS_BUILD_NUMBER"
fi
- |
if [[ "$TRAVIS_TEST_RESULT" == 0 ]]
then
aws s3 sync "s3://avmnu-sng/rspec-tap-formatters/$TRAVIS_BUILD_NUMBER" /var/tmp/coverage/
fi
- |
if [[ "$TRAVIS_TEST_RESULT" == 0 ]]
then
./cc-test-reporter sum-coverage --output - --parts $CI_NODE_TOTAL /var/tmp/coverage/codeclimate.*.json | ./cc-test-reporter upload-coverage --input -
fi