Skip to content

Commit

Permalink
Get simplecov to work in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
julianguyen committed Oct 14, 2023
1 parent 7d3337f commit 7c16685
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
nvm install v16.14
nvm alias default 16.14
echo 'export NVM_DIR="$HOME/.nvm"' >> $BASH_ENV
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV
- run: gem install bundler
Expand Down Expand Up @@ -110,8 +110,10 @@ jobs:
name: Run Rails Rspec Tests
command: |
set -e
bundle exec rspec --format progress --format RspecJunitFormatter -o $CIRCLE_TEST_REPORTS/rspec.xml
$MY_ENV_VAR bundle exec rspec --format progress --format RspecJunitFormatter -o $CIRCLE_TEST_REPORTS/rspec.xml
cd ~/ifmeorg/ifme/tmp && ./cc-test-reporter format-coverage -t simplecov -o codeclimate.backend.json ../coverage/.resultset.json
environment:
CC_TEST_REPORTER_ID: $CC_TEST_REPORTER_ID
- persist_to_workspace:
root: tmp
paths:
Expand Down
1 change: 1 addition & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

require 'simplecov'
SimpleCov.start 'rails'
SimpleCov.formatter = SimpleCov::Formatter::JSONFormatter

require File.expand_path('../config/environment', __dir__)
require 'rspec/rails'
Expand Down

0 comments on commit 7c16685

Please sign in to comment.