Skip to content

Commit

Permalink
Before and after build steps for code climate that handle parallelism
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcolvar committed Apr 2, 2019
1 parent 1fb99f7 commit 299e382
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/commands/code_climate_after_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
description: Sum the coverage files and submit to Code Climate.
steps:
- run:
command: |
./cc-test-reporter format-coverage -t simplecov -o "coverage/codeclimate.$CIRCLE_NODE_INDEX.json"
- deploy:
command: |
./cc-test-reporter sum-coverage --output - --parts $CIRCLE_NODE_TOTAL coverage/codeclimate.*.json | ./cc-test-reporter upload-coverage --debug --input -
14 changes: 14 additions & 0 deletions src/commands/code_climate_before_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
description: Install the Code Climate reporter then run before build.
parameters:
version:
type: string
default: latest
steps:
- run:
command: |
if [[ $(command -v cc-test-reporter) == "" ]]; then
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-<< parameters.version >>-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
fi
- run:
command: ./cc-test-reporter before-build

0 comments on commit 299e382

Please sign in to comment.