{"id":21896747,"url":"https://github.com/tj-actions/coverage-badge-go","last_synced_at":"2025-04-04T14:04:04.024Z","repository":{"id":38115760,"uuid":"417630742","full_name":"tj-actions/coverage-badge-go","owner":"tj-actions","description":":octocat: Generate coverage badge for go modules","archived":false,"fork":false,"pushed_at":"2025-03-23T12:12:14.000Z","size":384,"stargazers_count":76,"open_issues_count":7,"forks_count":33,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-03T08:29:34.832Z","etag":null,"topics":["actions","code-coverage","code-coverage-checker","coverage","coverage-report","coverage-testing","github","github-actions","go-coverage","golang","golang-action","golang-coverage","golang-coverage-profile"],"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/tj-actions.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","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},"funding":{"github":["jackton1"],"patreon":null,"open_collective":"tj-actions","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":[]}},"created_at":"2021-10-15T20:46:03.000Z","updated_at":"2025-03-23T12:11:35.000Z","dependencies_parsed_at":"2023-12-29T04:37:34.884Z","dependency_job_id":"5942df37-93df-4027-9e81-d01040cad0b8","html_url":"https://github.com/tj-actions/coverage-badge-go","commit_stats":{"total_commits":335,"total_committers":10,"mean_commits":33.5,"dds":0.5940298507462687,"last_synced_commit":"c94463312a72f7af4f470d178a5501def34dd55c"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tj-actions%2Fcoverage-badge-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tj-actions%2Fcoverage-badge-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tj-actions%2Fcoverage-badge-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tj-actions%2Fcoverage-badge-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tj-actions","download_url":"https://codeload.github.com/tj-actions/coverage-badge-go/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247190176,"owners_count":20898697,"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":["actions","code-coverage","code-coverage-checker","coverage","coverage-report","coverage-testing","github","github-actions","go-coverage","golang","golang-action","golang-coverage","golang-coverage-profile"],"created_at":"2024-11-28T14:12:05.413Z","updated_at":"2025-04-04T14:04:04.004Z","avatar_url":"https://github.com/tj-actions.png","language":"Go","funding_links":["https://github.com/sponsors/jackton1","https://opencollective.com/tj-actions","https://www.buymeacoffee.com/jackton1"],"categories":[],"sub_categories":[],"readme":"[![Ubuntu](https://img.shields.io/badge/Ubuntu-E95420?style=for-the-badge\\\u0026logo=ubuntu\\\u0026logoColor=white)](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on)\n[![Mac OS](https://img.shields.io/badge/mac%20os-000000?style=for-the-badge\\\u0026logo=macos\\\u0026logoColor=F0F0F0)](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on)\n[![Windows](https://img.shields.io/badge/Windows-0078D6?style=for-the-badge\\\u0026logo=windows\\\u0026logoColor=white)](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on)\n[![Public workflows that use this action.](https://img.shields.io/endpoint?style=for-the-badge\\\u0026url=https%3A%2F%2Fused-by.vercel.app%2Fapi%2Fgithub-actions%2Fused-by%3Faction%3Dtj-actions%2Fcoverage-badge-go%26badge%3Dtrue%26package_id%3DUGFja2FnZS0yOTQ5NTE3MzA0)](https://github.com/search?o=desc\\\u0026q=tj-actions+coverage-badge-go+path%3A.github%2Fworkflows+language%3AYAML\\\u0026s=\\\u0026type=Code)\n\n\u003c!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --\u003e\n\n[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-)\n\n\u003c!-- ALL-CONTRIBUTORS-BADGE:END --\u003e\n\n## coverage-badge-go\n\n\u003cimg align=\"right\" width=\"250px\" src=\"https://user-images.githubusercontent.com/17484350/138557170-d8079b94-a517-4366-ade8-8d473e3f3f1d.jpg\"\u003e\n\nGenerate a coverage badge like this one for your Golang projects without uploading results to a third party.\n\n                  👇\n\n[![CI](https://github.com/tj-actions/coverage-badge-go/workflows/CI/badge.svg)](https://github.com/tj-actions/coverage-badge-go/actions?query=workflow%3ACI)\n[![Coverage](https://img.shields.io/badge/Coverage-100.0%25-brightgreen)](https://github.com/tj-actions/coverage-badge-go/actions/workflows/test.yml)\n[![Update release version.](https://github.com/tj-actions/coverage-badge-go/workflows/Update%20release%20version./badge.svg)](https://github.com/tj-actions/coverage-badge-go/actions?query=workflow%3A%22Update+release+version.%22)\n\n## Usage\n\n```yaml\nname: Generate code coverage badge\n\non:\n  pull_request:\n    branches:\n      - main\n\njobs:\n  test:\n    runs-on: ubuntu-latest\n    name: Update coverage badge\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n        with:\n          persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.\n          fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.\n      \n      - name: Setup go\n        uses: actions/setup-go@v4\n        with:\n          go-version-file: 'go.mod'\n\n      - name: Run Test\n        run: |\n          go test -v ./... -covermode=count -coverprofile=coverage.out\n          go tool cover -func=coverage.out -o=coverage.out\n\n      - name: Go Coverage Badge  # Pass the `coverage.out` output to this action\n        uses: tj-actions/coverage-badge-go@v2\n        with:\n          filename: coverage.out\n\n      - name: Verify Changed files\n        uses: tj-actions/verify-changed-files@v16\n        id: verify-changed-files\n        with:\n          files: README.md\n\n      - name: Commit changes\n        if: steps.verify-changed-files.outputs.files_changed == 'true'\n        run: |\n          git config --local user.email \"action@github.com\"\n          git config --local user.name \"GitHub Action\"\n          git add README.md\n          git commit -m \"chore: Updated coverage badge.\"\n\n      - name: Push changes\n        if: steps.verify-changed-files.outputs.files_changed == 'true'\n        uses: ad-m/github-push-action@master\n        with:\n          github_token: ${{ github.token }}\n          branch: ${{ github.head_ref }}\n```\n\n## Signed commits\n\nIn order to create signed commits see full guide [here](https://httgp.com/signing-commits-in-github-actions/)\n\n## Inputs\n\n\u003c!-- AUTO-DOC-INPUT:START - Do not remove or modify this section --\u003e\n\n```yaml\n- uses: tj-actions/coverage-badge-go@v2\n  id: coverage-badge-go\n  with:\n    # Color of the badge - \n    # green/yellow/red \n    # Type: string\n    color: ''\n\n    # File containing the tests output\n    # Type: string\n    # Default: \"coverage.out\"\n    filename: ''\n\n    # At what percentage does the \n    # badge become green instead of \n    # yellow (default: 70) \n    # Type: string\n    green: ''\n\n    # Optional URL when you click \n    # the badge \n    # Type: string\n    link: ''\n\n    # Target file (default \"README.md\")\n    # Type: string\n    target: ''\n\n    # Text on the left side \n    # of the badge (default: \"Coverage\") \n    # Type: string\n    text: ''\n\n    # Text on the right side \n    # of the badge \n    # Type: string\n    value: ''\n\n    # At what percentage does the \n    # badge become yellow instead of \n    # red (default 30) \n    # Type: string\n    yellow: ''\n\n```\n\n\u003c!-- AUTO-DOC-INPUT:END --\u003e\n\n*   Free software: [MIT license](LICENSE)\n\nIf you feel generous and want to show some extra appreciation:\n\n[![Buy me a coffee][buymeacoffee-shield]][buymeacoffee]\n\n[buymeacoffee]: https://www.buymeacoffee.com/jackton1\n\n[buymeacoffee-shield]: https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png\n\n## Credits\n\nThis package was created with [Cookiecutter](https://github.com/cookiecutter/cookiecutter) using [cookiecutter-action](https://github.com/tj-actions/cookiecutter-action)\n\n*   [gobadge](https://github.com/AlexBeauchemin/gobadge)\n*   [gobinaries](https://github.com/tj/gobinaries)\n\n## Report Bugs\n\nReport bugs at https://github.com/tj-actions/coverage-badge-go/issues.\n\nIf you are reporting a bug, please include:\n\n*   Your operating system name and version.\n*   Any details about your workflow that might be helpful in troubleshooting.\n*   Detailed steps to reproduce the bug.\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\n\u003c!-- prettier-ignore-start --\u003e\n\n\u003c!-- markdownlint-disable --\u003e\n\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/mdonahue-godaddy\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/81647737?v=4?s=100\" width=\"100px;\" alt=\"Michael Donahue\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMichael Donahue\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/tj-actions/coverage-badge-go/issues?q=author%3Amdonahue-godaddy\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e \u003ca href=\"https://github.com/tj-actions/coverage-badge-go/commits?author=mdonahue-godaddy\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftj-actions%2Fcoverage-badge-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftj-actions%2Fcoverage-badge-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftj-actions%2Fcoverage-badge-go/lists"}