31
31
command : |
32
32
bundle install --jobs=4 --retry=3 --path vendor/bundle
33
33
34
- - run :
35
- name : Install Code Climate Test Reporter
36
- command : |
37
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
38
- chmod +x ./cc-test-reporter
39
-
40
34
- save_cache :
41
35
paths :
42
36
- ./vendor/bundle
@@ -56,43 +50,17 @@ jobs:
56
50
- run :
57
51
name : run tests
58
52
command : |
59
- mkdir -p tmp/test-results tmp/test-artifacts
60
- ./cc-test-reporter before-build
53
+ mkdir /tmp/test-results
61
54
TEST_FILES="$(circleci tests glob "spec/usage/**/*_spec.rb" | circleci tests split --split-by=timings)"
62
55
63
56
bundle exec rspec --format progress \
64
57
--out /tmp/test-results/rspec.xml \
65
58
--format progress \
66
- -- ${TEST_FILES}
67
-
68
- - run :
69
- name : Code Climate Test Coverage
70
- command : |
71
- ./cc-test-reporter format-coverage -t simplecov -o "coverage/codeclimate.$CIRCLE_NODE_INDEX.json"
72
- - persist_to_workspace :
73
- root : coverage
74
- paths :
75
- - codeclimate.*.json
59
+ $TEST_FILES
76
60
77
61
# collect reports
78
62
- store_test_results :
79
63
path : /tmp/test-results
80
64
- store_artifacts :
81
- path : /tmp/test-artifacts
82
-
83
- upload-coverage :
84
- docker :
85
- - image : circleci/ruby:2.5.1-stretch-node
86
- environment :
87
- CC_TEST_REPORTER_ID : 57123bd0e8b6c96bd254bf1fe46a5582250cd5e726ff639f85bfcd310f870f4a
88
- working_directory : ~/repo
89
-
90
- steps :
91
- - run :
92
- name : Install Code Climate Test Reporter
93
- command : |
94
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
95
- chmod +x ./cc-test-reporter
96
- - run :
97
- command : |
98
- ./cc-test-reporter sum-coverage --output - codeclimate.*.json | ./cc-test-reporter upload-coverage --debug --input -
65
+ path : /tmp/test-results
66
+ destination : test-results
0 commit comments