Skip to content

amaysim-au/docker-codeclimate-test-reporter

Repository files navigation

Project status Maintainability Test Coverage License Docker Build Status Docker Automated build

Docker CodeClimate Test Reporter

CodeClimate Test Reporter in a Docker Container

Usage

# build image locally
$ make dockerBuild
# test the image
$ make dockerTest
# go inside the container
$ make dockerShell

Update Docker image

  1. Apply the changes

For version update, Makefile and Dockerfile need to be updated

  1. Build and test locally $ make dockerBuild dockerTest
  2. Commit and push
  3. Run $ make tag
  4. Go to hub.docker.com
  5. In Build Details tab, you should now see the build kicking off

Test with Code Climate

This repository contains a Go example to be used for testing test coverage and Code Climate.

  1. Add this repository to Code Climate
    1. Select "Open source"
    2. 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.

  2. Get the "CC_TEST_REPORTER_ID"
    1. Go to "Settings"
    2. Go to "Test coverage"
  3. Create a .env file based on .env.template
    1. The file should contain CC_TEST_REPORTER_ID=the-id-from-settings
  4. Run the tests which will also send the report to Code Climate $ make test
  5. Back to the Code Climate web site, you should see the coverage being 100%
  6. Clean everything $ make clean

About

Codeclimate Test Reporter in a Docker Container

Resources

License

Stars

Watchers

Forks

Packages

No packages published