CodeClimate Test Reporter in a Docker Container
# build image locally
$ make dockerBuild
# test the image
$ make dockerTest
# go inside the container
$ make dockerShell
- Apply the changes
For version update, Makefile and Dockerfile need to be updated
- Build and test locally
$ make dockerBuild dockerTest
- Commit and push
- Run
$ make tag
- Go to hub.docker.com
- In
Build Details
tab, you should now see the build kicking off
This repository contains a Go example to be used for testing test coverage and Code Climate.
- Add this repository to Code Climate
- Select "Open source"
- then "Add a repository"
Skip this section if it is already there. However, you may need to commit a code change so that it sends a new code coverage.
- Get the "CC_TEST_REPORTER_ID"
- Go to "Settings"
- Go to "Test coverage"
- Create a
.env
file based on.env.template
- The file should contain
CC_TEST_REPORTER_ID=the-id-from-settings
- The file should contain
- Run the tests which will also send the report to Code Climate
$ make test
- Back to the Code Climate web site, you should see the coverage being 100%
- Clean everything
$ make clean