mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-27 04:51:14 +00:00
Test code climate
This commit is contained in:
parent
eb08649732
commit
2169d410dd
1 changed files with 15 additions and 0 deletions
|
@ -21,6 +21,8 @@ references:
|
|||
|
||||
jobs:
|
||||
build:
|
||||
environment:
|
||||
CC_TEST_REPORTER_ID: b3db5b7df9a0a1d0fd3503e72d7431ffbfa172492c2840d590ccb2fafd9172d3
|
||||
docker:
|
||||
- *default_docker_ruby_executor
|
||||
steps:
|
||||
|
@ -45,6 +47,17 @@ jobs:
|
|||
key: rails-demo-bundle-v2-{{ checksum "Gemfile.lock" }}
|
||||
paths:
|
||||
- vendor/bundle
|
||||
- run:
|
||||
name: Setup dependencies
|
||||
command: |
|
||||
sudo composer self-update
|
||||
composer install -n --prefer-dist
|
||||
# download test reporter as a static binary
|
||||
- run:
|
||||
name: Setup 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
|
||||
# Only necessary if app uses webpacker or yarn in some other way
|
||||
#- restore_cache:
|
||||
# keys:
|
||||
|
@ -92,8 +105,10 @@ jobs:
|
|||
- run:
|
||||
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 -r rspec_junit_formatter --format RspecJunitFormatter --out /tmp/test-results/rspec.xml --format progress
|
||||
./cc-test-reporter after-build --coverage-input-type clover --exit-code $?
|
||||
- store_test_results:
|
||||
path: /tmp/test-results
|
||||
- store_artifacts:
|
||||
|
|
Loading…
Reference in a new issue