-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f24c3ec
commit b478597
Showing
3 changed files
with
11 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
version: 2 | ||
version: 2.1 | ||
|
||
orbs: | ||
codecov: codecov/[email protected] | ||
|
||
references: | ||
default_docker_ruby_executor: &default_docker_ruby_executor | ||
|
@@ -51,49 +54,17 @@ jobs: | |
key: active_force-{{ checksum "active_force.gemspec" }} | ||
paths: | ||
- ~/active_force/active_force_index/vendor/bundle | ||
- run: | ||
name: Install Code Climate Test Reporter | ||
command: | | ||
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter | ||
chmod +x ./cc-test-reporter | ||
- run: | ||
name: Run RSpec | ||
command: | | ||
mkdir /tmp/test-results | ||
./cc-test-reporter before-build | ||
TESTFILES=$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings) | ||
bundle exec rspec $TESTFILES --profile 10 --format RspecJunitFormatter --out /tmp/test-results/rspec.xml --format progress | ||
- run: | ||
name: Code Climate Test Coverage | ||
command: | | ||
./cc-test-reporter format-coverage -t simplecov -o "coverage/codeclimate.$CIRCLE_NODE_INDEX.json" | ||
- persist_to_workspace: | ||
root: coverage | ||
paths: | ||
- codeclimate.*.json | ||
- store_test_results: | ||
path: /tmp/test-results | ||
- store_artifacts: | ||
path: /tmp/test-results | ||
destination: test-results | ||
- codecov/upload | ||
- store_artifacts: | ||
path: coverage | ||
upload-coverage: | ||
working_directory: ~/active_force/active_force_index | ||
docker: | ||
- *default_docker_ruby_executor | ||
steps: | ||
- attach_workspace: | ||
at: ~/active_force/active_force_index | ||
- run: | ||
name: Install Code Climate Test Reporter | ||
command: | | ||
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter | ||
chmod +x ./cc-test-reporter | ||
- run: | ||
name: Combine and Upload Coverage | ||
command: | | ||
./cc-test-reporter sum-coverage --output - codeclimate.*.json | ./cc-test-reporter upload-coverage --debug --input - | ||
|
||
workflows: | ||
version: 2 | ||
build_and_test: | ||
|
@@ -102,6 +73,3 @@ workflows: | |
- rspec-test: | ||
requires: | ||
- build | ||
- upload-coverage: | ||
requires: | ||
- rspec-test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters