Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix examples that use simplecov #516

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix examples that uses simplecov
As I mentioned in #495 (comment),
`cc-test-reporter format-coverage --input-type=simplecov` needs the test
to have run with `CC_TEST_REPORTER_ID` is set, otherwise it parses
a coverage file in legacy format that crashes `cc-test-reporter`.
  • Loading branch information
manicmaniac committed Apr 9, 2023
commit 894dcd079fddbf67e3fe09b3a4eb2a2a4746949f
3 changes: 3 additions & 0 deletions examples/multiple_suites.md
Original file line number Diff line number Diff line change
@@ -54,6 +54,9 @@ jobs:
command: |
bundle exec rake
./tmp/cc-test-reporter format-coverage -t simplecov -o tmp/codeclimate.backend.json coverage/backend/.resultset.json
environment:
# Note that to make simplecov output in appropriate format, `CC_TEST_REPORTER_ID` environment variable should be set before testing
- CC_TEST_REPORTER_ID: 1acf55093f33b525eefdd9fb1e601d748e5d8b1267729176605edb4b5d82dc3d
- persist_to_workspace:
root: tmp
paths:
5 changes: 5 additions & 0 deletions examples/ruby_examples.md
Original file line number Diff line number Diff line change
@@ -37,6 +37,7 @@ before_script:
- ./cc-test-reporter before-build

script:
# Note that to make simplecov output in appropriate format, `CC_TEST_REPORTER_ID` environment variable should be set before testing
- bundle exec rake $TASKS

after_script:
@@ -100,6 +101,7 @@ before_script: bundle exec rake db:create db:migrate
# Run the test suites
script:
- bundle exec rubocop -DESP # Backend linting
# Note that to make simplecov output in appropriate format, `CC_TEST_REPORTER_ID` environment variable should be set before testing
- bundle exec rake # Backend specs
#- npm test -- --browsers Firefox # Frontend specs
- npm test # Frontend linting & specs
@@ -204,6 +206,9 @@ jobs:
--out test-results/rspec/rspec.xml \
--format progress \
-- ${TESTFILES}
environment:
# Note that to make simplecov output in appropriate format, `CC_TEST_REPORTER_ID` environment variable should be set before testing
CC_TEST_REPORTER_ID: c3ff91e23ea0fea718bb62dae0a8a5440dc082d5d2bb508af6b33d0babac479a
- run:
name: Code Climate Test Coverage
command: |