{"id":13532317,"url":"https://github.com/paambaati/codeclimate-action","last_synced_at":"2025-05-14T06:13:11.129Z","repository":{"id":35187188,"uuid":"201384088","full_name":"paambaati/codeclimate-action","owner":"paambaati","description":"GitHub Action to send your code coverage to CodeClimate","archived":false,"fork":false,"pushed_at":"2025-02-01T10:25:50.000Z","size":21610,"stargazers_count":206,"open_issues_count":14,"forks_count":66,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-05T19:17:16.102Z","etag":null,"topics":["codeclimate","coverage","github-actions","nodejs","quality","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/paambaati.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-08-09T03:41:57.000Z","updated_at":"2025-04-22T21:26:49.000Z","dependencies_parsed_at":"2023-12-08T06:31:49.428Z","dependency_job_id":"a6826505-a607-47df-8b96-b446e150cf95","html_url":"https://github.com/paambaati/codeclimate-action","commit_stats":{"total_commits":852,"total_committers":27,"mean_commits":"31.555555555555557","dds":0.7370892018779343,"last_synced_commit":"39115dde8dc5ceceefd93fefd619bf0d93be82d9"},"previous_names":[],"tags_count":53,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paambaati%2Fcodeclimate-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paambaati%2Fcodeclimate-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paambaati%2Fcodeclimate-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paambaati%2Fcodeclimate-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paambaati","download_url":"https://codeload.github.com/paambaati/codeclimate-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254081280,"owners_count":22011598,"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":["codeclimate","coverage","github-actions","nodejs","quality","typescript"],"created_at":"2024-08-01T07:01:09.989Z","updated_at":"2025-05-14T06:13:11.101Z","avatar_url":"https://github.com/paambaati.png","language":"TypeScript","readme":"# codeclimate-action\n\n[![Test Coverage](https://api.codeclimate.com/v1/badges/8f2233d4c51c92ad427c/test_coverage)](https://codeclimate.com/github/paambaati/codeclimate-action/test_coverage)\n[![Build Status](https://github.com/paambaati/codeclimate-action/actions/workflows/ci.yml/badge.svg)](https://github.com/paambaati/codeclimate-action/actions/workflows/ci.yml)\n[![MIT License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n\nA GitHub action that publishes your code coverage to [Code Climate](http://codeclimate.com/).\n\n## Usage\n\nThis action requires that you set the [`CC_TEST_REPORTER_ID`](https://docs.codeclimate.com/docs/configuring-test-coverage) environment variable. You can find it under Repo Settings in your Code Climate project.\n\n### Inputs\n\n| Input               | Default     | Description                                                                                                                                                                                                                                                           |\n|---------------------|-------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `coverageCommand`   |             | The actual command that should be executed to run your tests and capture coverage.                                                                                                                                                                                    |\n| `workingDirectory`  |             | Specify a custom working directory where the coverage command should be executed.                                                                                                                                                                                     |\n| `debug`             | `false`     | Enable Code Coverage debug output when set to `true`.                                                                                                                                                                                                                 |\n| `coverageLocations` |             | Locations to find code coverage as a multiline string.\u003cbr\u003eEach line should be of the form `\u003clocation\u003e:\u003ctype\u003e`.\u003cbr\u003e`type` can be any one of `clover, cobertura, coverage.py, excoveralls, gcov, gocov, jacoco, lcov, lcov-json, simplecov, xccov`. See examples below. |\n| `prefix`            | `undefined` | See [`--prefix`](https://docs.codeclimate.com/docs/configuring-test-coverage)                                                                                                                                                                                         |\n| `verifyDownload`    | `true`      | Verifies the downloaded Code Climate reporter binary's checksum and GPG signature. See [Verifying binaries](https://github.com/codeclimate/test-reporter#verifying-binaries)                                                                                          |\n| `verifyEnvironment` | `true`      | Verifies the current runtime environment (operating system and CPU architecture) is supported by the Code Climate reporter. See [list of supported platforms](https://github.com/codeclimate/test-reporter#binaries)                                                  |\n| `batchSize`         |             | Batch size for source files (cc-test-reporter upload-coverage uses 500 by default)                                                                                                                                                                                    |\n\n\u003e **Note**\n\u003e If you are a Ruby developer using [SimpleCov](https://github.com/simplecov-ruby/simplecov), other users have recommended installing an additional gem – `gem \"simplecov_json_formatter\"` – this gem fixes `json` error from the default `coverage/.resultset.json` output from SimpleCov.\n\n#### Example\n\n```yaml\nsteps:\n  - name: Test \u0026 publish code coverage\n    uses: paambaati/codeclimate-action@v9.0.0\n    env:\n      CC_TEST_REPORTER_ID: \u003ccode_climate_reporter_id\u003e\n    with:\n      coverageCommand: npm run coverage\n      debug: true\n```\n\n#### Example with only upload\n\nWhen you've already generated the coverage report in a previous step and wish to just upload the coverage data to Code Climate, you can leave out the `coverageCommand` option.\n\n```yaml\nsteps:\n  - name: Test \u0026 publish code coverage\n    uses: paambaati/codeclimate-action@v9.0.0\n    env:\n      CC_TEST_REPORTER_ID: \u003ccode_climate_reporter_id\u003e\n```\n\n#### Example with wildcard (glob) pattern\n\nThis action supports basic glob patterns to search for files matching given patterns. It uses [`@actions/glob`](https://github.com/actions/toolkit/tree/master/packages/glob#basic) to expand the glob patterns.\n\n```yaml\nsteps:\n  - name: Test \u0026 publish code coverage\n    uses: paambaati/codeclimate-action@v9.0.0\n    env:\n      CC_TEST_REPORTER_ID: \u003ccode_climate_reporter_id\u003e\n    with:\n      coverageCommand: yarn run coverage\n      coverageLocations: |\n        ${{github.workspace}}/*.lcov:lcov\n```\n\n#### Example with Jacoco\n\n```yaml\nsteps:\n  - name: Test \u0026 publish code coverage\n    uses: paambaati/codeclimate-action@v9.0.0\n    env:\n      # Set CC_TEST_REPORTER_ID as secret of your repo\n      CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}\n      JACOCO_SOURCE_PATH: \"${{github.workspace}}/src/main/java\"\n    with:\n      # The report file must be there, otherwise Code Climate won't find it\n      coverageCommand: mvn test\n      coverageLocations: ${{github.workspace}}/target/site/jacoco/jacoco.xml:jacoco\n```\n\n#### Example of multiple test coverages for monorepo with Jest\n\nLet's say you have a monorepo with two folders —`client` and `server`, both with their own coverage folders and a `yarn coverage` script which runs Jest within both folders.\n\n```json\n\"scripts\": {\n  \"coverage\": \"yarn client coverage \u0026\u0026 yarn server coverage\"\n}\n```\n\nFirst be sure that paths in your `coverage/lcov.info` are correct; they should be either absolute or relative to the **root** of the monorepo. Open `lcov.info` and search for any path. For example —\n\n```lcov\nSF:src/server.ts\n```\n\nIf you find a *relative* path like this (happens for Jest 25+), it's incorrect as it is relative to the sub-package. This can be fixed by configuring Jest to set the root of your monorepo —\n\n```javascript\n// server/jest.config.js\nmodule.exports = {\n  ...\n  coverageReporters: [['lcov', { projectRoot: '..' }]]\n  ...\n};\n```\n\n```yaml\nsteps:\n  - name: Test \u0026 publish code coverage\n    uses: paambaati/codeclimate-action@v9.0.0\n    env:\n      CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}\n    with:\n      coverageCommand: yarn run coverage\n      coverageLocations: |\n        ${{github.workspace}}/client/coverage/lcov.info:lcov\n        ${{github.workspace}}/server/coverage/lcov.info:lcov\n```\n\nExample projects\n\n1. [paambaati/websight](https://github.com/paambaati/websight/blob/5ab56bcc365ee73dd7937e87267db30f6357c4cd/.github/workflows/ci.yml#L33-L50)\n\n2. [MartinNuc/coverage-ga-test](https://github.com/MartinNuc/coverage-ga-test/blob/master/.github/workflows/ci.yaml)\n","funding_links":[],"categories":["Community Resources","TypeScript"],"sub_categories":["Static Analysis","Testing and Linting"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaambaati%2Fcodeclimate-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaambaati%2Fcodeclimate-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaambaati%2Fcodeclimate-action/lists"}