{"id":15318338,"url":"https://github.com/appleboy/golang-testing","last_synced_at":"2025-10-07T04:18:54.729Z","repository":{"id":66187441,"uuid":"64071469","full_name":"appleboy/golang-testing","owner":"appleboy","description":"Docker image includes golang coverage tools for testing.","archived":false,"fork":false,"pushed_at":"2018-09-13T01:02:20.000Z","size":261,"stargazers_count":30,"open_issues_count":0,"forks_count":17,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-13T18:44:51.835Z","etag":null,"topics":["docker","docker-image","dockerfiles","golang-testing"],"latest_commit_sha":null,"homepage":"","language":"Roff","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/appleboy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-07-24T15:15:16.000Z","updated_at":"2024-02-09T12:16:54.000Z","dependencies_parsed_at":"2023-02-21T17:00:27.177Z","dependency_job_id":null,"html_url":"https://github.com/appleboy/golang-testing","commit_stats":{"total_commits":79,"total_committers":2,"mean_commits":39.5,"dds":"0.012658227848101222","last_synced_commit":"dd3f4ec36099788bf981a94e3475d8e072ab5816"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/appleboy/golang-testing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appleboy%2Fgolang-testing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appleboy%2Fgolang-testing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appleboy%2Fgolang-testing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appleboy%2Fgolang-testing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/appleboy","download_url":"https://codeload.github.com/appleboy/golang-testing/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appleboy%2Fgolang-testing/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278718236,"owners_count":26033719,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-image","dockerfiles","golang-testing"],"created_at":"2024-10-01T08:59:45.100Z","updated_at":"2025-10-07T04:18:54.705Z","avatar_url":"https://github.com/appleboy.png","language":"Roff","readme":"# golang-testing\n\n![Golang Testing](https://farm2.staticflickr.com/1622/24407557644_36087ca6de.jpg)\n\n**Docker image includes golang coverage tools for testing.**\n\n[![Build Status](https://travis-ci.org/appleboy/golang-testing.svg?branch=master)](https://travis-ci.org/appleboy/golang-testing) [![codecov](https://codecov.io/gh/appleboy/golang-testing/branch/master/graph/badge.svg)](https://codecov.io/gh/appleboy/golang-testing) [![Go Report Card](https://goreportcard.com/badge/github.com/appleboy/golang-testing)](https://goreportcard.com/report/github.com/appleboy/golang-testing)\n\n## Feature\n\nThe docker images includes the following `golang` tools.\n\n* [x] [go-junit-report](https://github.com/jstemmer/go-junit-report) Convert go test output to junit xml\n* [x] [gocov](https://github.com/axw/gocov/gocov) Coverage testing tool\n* [x] [gocov-xml](https://github.com/AlekSi/gocov-xml) XML (Cobertura) export\n* [x] [golint](https://github.com/golang/lint/golint) This is a linter for Go source code. (Golint requires Go 1.6 or later.)\n* [x] [glide](https://github.com/Masterminds/glide) Package Management for Golang\n* [x] [govendor](https://github.com/kardianos/govendor) Package Management for Golang\n* [x] [cloc](https://github.com/AlDanial/cloc) Count Lines of Code.\n* [x] [blackfriday-tool](https://github.com/russross/blackfriday-tool) a markdown processor for Go.\n\n## Install\n\nCopy `coverage.sh` to `/usr/local/bin/coverage` and change permission.\n\n```\n$ curl https://raw.githubusercontent.com/appleboy/golang-testing/1.0.2/coverage.sh -o $GOPATH/bin/coverage\n$ chmod +x $GOPATH/bin/coverage\n```\n\n## Usage\n\ncoverage tool document:\n\n```\nGenerate test coverage statistics for Go packages.\n\n  -- Command Flag --\n  -h | --help                    Display this help and exit\n  -m | --mode                    Set coverage mode. default is \"set\" (set|count|atomic)\n  -d | --dir                     Set store coverage folder (default is \".cover\")\n\n  -- Command Action --\n  tool                           Install go dependency tools like gocov or golint.\n  testing                        Run go testing for all packages\n  coverage                       Generate coverage report for all packages\n  junit                          Generate coverage xml report for junit plugin\n  lint                           Generate Lint report for all packages\n  vet                            Generate Vet report for all packages\n  cloc                           Generate Count Lines of Code report for all files\n  all                            Execute coverage、junit、lint、vet and cloc report\n\nContribute and source at https://github.com/appleboy/golang-testing\n```\n\n## Run with docker\n\nPull the latest [golang-testing](https://hub.docker.com/r/appleboy/golang-testing/) docker image.\n\n```\n$ docker pull appleboy/golang-testing\n```\n\n### docker command\n\nRun testing in single docker command.\n\n```\n$ export PROJECT_PATH=/go/src/github.com/appleboy/golang-testing\n$ docker run --rm \\\n    -v $(PWD):$PROJECT_PATH \\\n    -w=$PROJECT_PATH \\\n    appleboy/golang-testing \\\n    sh -c \"coverage all\"\n```\n\nChange `PROJECT_PATH` variable. Replace `github.com/appleboy/golang-testing` with your github path.\n\n### docker-compose command\n\nPlease see [docker/docker-compose.yml](./docker/docker-compose.yml) example file. Run the following command.\n\n```\n$ export PROJECT_PATH=/go/src/github.com/appleboy/golang-testing\n$ docker-compose -f docker/docker-compose.yml run golang-testing \\\n  sh -c \"coverage all\"\n```\n\n## Demo\n\n```\n$ git clone https://github.com/appleboy/golang-testing.git\n$ cd golang-testing\n$ export PROJECT_PATH=/go/src/github.com/appleboy/golang-testing\n$ docker run --rm \\\n    -v $(PWD):$(PROJECT_PATH) \\\n    -w=$(PROJECT_PATH) \\\n    appleboy/golang-testing \\\n    sh -c \"make update \u0026\u0026 coverage all\"\n# or docker-compose command\n$ docker-compose -f docker/docker-compose.yml \\\n    run golang-testing\n```\n\n## Screenshot\n\n![Testing](./screenshot/screen.png)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappleboy%2Fgolang-testing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappleboy%2Fgolang-testing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappleboy%2Fgolang-testing/lists"}