{"id":18977950,"url":"https://github.com/becheran/go-testreport","last_synced_at":"2025-04-19T17:34:26.887Z","repository":{"id":65373790,"uuid":"582754926","full_name":"becheran/go-testreport","owner":"becheran","description":"Generate a markdown test report from the go json test result","archived":false,"fork":false,"pushed_at":"2025-02-22T16:57:19.000Z","size":132,"stargazers_count":32,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T10:51:18.473Z","etag":null,"topics":["github-actions","go","markdown","report","unittest"],"latest_commit_sha":null,"homepage":"","language":"Go","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/becheran.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-27T19:24:33.000Z","updated_at":"2025-02-24T06:40:57.000Z","dependencies_parsed_at":"2024-04-09T18:36:34.125Z","dependency_job_id":"a6e7b41f-9ee8-4d59-995e-5fabd8d7c7b7","html_url":"https://github.com/becheran/go-testreport","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/becheran%2Fgo-testreport","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/becheran%2Fgo-testreport/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/becheran%2Fgo-testreport/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/becheran%2Fgo-testreport/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/becheran","download_url":"https://codeload.github.com/becheran/go-testreport/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249235071,"owners_count":21235143,"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","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":["github-actions","go","markdown","report","unittest"],"created_at":"2024-11-08T15:31:29.725Z","updated_at":"2025-04-16T11:31:34.951Z","avatar_url":"https://github.com/becheran.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go Test Report\n\n[![Pipeline Status](https://github.com/becheran/go-testreport/actions/workflows/go.yml/badge.svg)](https://github.com/becheran/go-testreport/actions/workflows/go.yml)\n[![Go Report Card][go-report-image]][go-report-url]\n[![PRs Welcome][pr-welcome-image]][pr-welcome-url]\n[![License][license-image]][license-url]\n[![GHAction][gh-action-image]][gh-action-url]\n\n[license-url]: https://github.com/becheran/go-testreport/blob/main/LICENSE\n[license-image]: https://img.shields.io/badge/License-MIT-brightgreen.svg\n[go-report-image]: https://img.shields.io/badge/go%20report-A+-brightgreen.svg?style=flat\n[go-report-url]: https://goreportcard.com/report/github.com/becheran/go-testreport\n[pr-welcome-image]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg\n[pr-welcome-url]: https://github.com/becheran/go-testreport/blob/main/CONTRIBUTING.md\n[gh-action-image]: https://img.shields.io/badge/Get-GH_Action-blue\n[gh-action-url]: https://github.com/marketplace/actions/golang-test-report\n\nGenerate a markdown test report from the go json test result.\n\nMatches perfectly with [github job summaries]( https://github.blog/news-insights/product-news/supercharging-github-actions-with-job-summaries/) to visualize test results:\n\n![ReportExample](./doc/GitHubReport.png)\n\nThe default output sorts the tests by failing and slowest execution time.\n\n## Install\n\n### Go\n\nInstall via the go install command:\n\n``` sh\ngo install github.com/becheran/go-testreport@latest\n```\n\n### Binaries\n\nOr use the pre-compiled binaries for Linux, Windows, and Mac OS from the [github releases page](https://github.com/becheran/go-testreport/releases).\n\n## Usage\n\nRun the following command to get a list of all available command line options:\n\n``` sh\ngo-testreport -h\n```\n\n### Input and Output\n\nWhen `-input` and `-output` is not set, the stdin stream will be used and return the result will be written to stdout. Will exit with a non zero exit code if at least one test failed:\n\n``` sh\ngo test ./... -json | go-testreport \u003e result.html\n```\n\nUse the `-input` and `-output` file to set files for the input and output. Will always exit with zero also if tests fail:\n\n``` sh\ngo-testreport -input result.json -output result.html\n```\n\n### Templates\n\nCustomize by providing a own [template file](https://pkg.go.dev/text/template). See also the [default markdown template](./src/report/templates/md.tmpl) which is used if the `-template` argument is left empty. With the `vars` options custom dynamic values can be passed to the template from the outside which can be resolved within the template:\n\n``` sh\ngo test ./... -json | go-testreport -template=./html.tmpl -vars=\"Title:Test Report Linux\" \u003e $GITHUB_STEP_SUMMARY\n```\n\n### GitHub Actions\n\nThe [Golang Test Report](https://github.com/marketplace/actions/golang-test-report) from the marketplace can be used to integrate the go-testreport tool into an GitHub workflow:\n\n``` yaml\n- name: Test\n  run: go test ./... -json \u003e report.json\n- name: Report\n  uses: becheran/go-testreport@main\n  with:\n    input: report.json\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbecheran%2Fgo-testreport","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbecheran%2Fgo-testreport","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbecheran%2Fgo-testreport/lists"}