Skip to content

Commit 4916f34

Browse files
committed
Before and after build steps for code climate that handle parallelism
1 parent e0dcfc7 commit 4916f34

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
description: Sum the coverage files and submit to Code Climate.
2+
steps:
3+
- run:
4+
command: |
5+
./cc-test-reporter format-coverage -t simplecov -o "coverage/codeclimate.$CIRCLE_NODE_INDEX.json"
6+
- deploy:
7+
command: |
8+
./cc-test-reporter sum-coverage --output - --parts $CIRCLE_NODE_TOTAL coverage/codeclimate.*.json | ./cc-test-reporter upload-coverage --debug --input -
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
description: Install the Code Climate reporter then run before build.
2+
parameters:
3+
version:
4+
type: string
5+
default: latest
6+
steps:
7+
- run:
8+
command: |
9+
if [[ $(command -v cc-test-reporter) == "" ]]; then
10+
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-<< parameters.version >>-linux-amd64 > ./cc-test-reporter
11+
chmod +x ./cc-test-reporter
12+
fi
13+
- run:
14+
command: ./cc-test-reporter before-build

0 commit comments

Comments
 (0)