Semaphore CI Test Coverage

πŸ“˜

Examples

For more example scripts, head to the test reporter repo on GitHub.

  1. Add CC_TEST_REPORTER_ID to the Environment Variables (Project Settings -> Environment Variables)
616

πŸ“˜

Note: It’s not necessary to check Encrypt content

  1. Update Build Settings
    see text to copy below screenshots
616
  1. Update After job Settings
613

Commands from this comment and this comment

# setup 1
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter

# setup 2 
chmod +x ./cc-test-reporter

# setup 4
./cc-test-reporter before-build


# After job
exitcode=$(if [ "$SEMAPHORE_THREAD_RESULT" == "passed" ]; then echo 0; else echo 1; fi)
./cc-test-reporter after-build --exit-code $exitcode

Troubleshooting

Error: could not find any viable formatter. available formatters: simplecov, lcov, coverage.py, clover, gocov, gcov, cobertura, jacoco