All Projects → paambaati → codeclimate-action

paambaati / codeclimate-action

Licence: MIT license
GitHub Action to send your code coverage to CodeClimate

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to codeclimate-action

jacoco-report
Github action that publishes the JaCoCo report as a comment in the Pull Request
Stars: ✭ 31 (-78.62%)
Mutual labels:  coverage, github-actions
codeclimate-phpcodesniffer
Code Climate Engine for PHP Code Sniffer
Stars: ✭ 27 (-81.38%)
Mutual labels:  quality, codeclimate
pytest-coverage-comment
Comments a pull request with the pytest code coverage badge and full report
Stars: ✭ 32 (-77.93%)
Mutual labels:  coverage, github-actions
ghaction-cmake
cmake swiss army knife github docker action
Stars: ✭ 19 (-86.9%)
Mutual labels:  coverage, github-actions
Codeclimate
Code Climate CLI
Stars: ✭ 2,273 (+1467.59%)
Mutual labels:  quality, codeclimate
tarpaulin
📈 GitHub Action for code coverage reporting with tarpaulin
Stars: ✭ 69 (-52.41%)
Mutual labels:  coverage, github-actions
python-test-reporter
DEPRECATED Uploads Python test coverage data to Code Climate
Stars: ✭ 18 (-87.59%)
Mutual labels:  quality, codeclimate
mylib
Шаблон кросплатформенного CMake-проекта для языка C++ 🇬🇧 Modern CMake crossplatform project template for C++
Stars: ✭ 49 (-66.21%)
Mutual labels:  coverage, github-actions
Coveragechecker
Allows old code to use new standards
Stars: ✭ 159 (+9.66%)
Mutual labels:  quality, coverage
codeclimate-duplication
Code Climate engine for code duplication analysis
Stars: ✭ 96 (-33.79%)
Mutual labels:  quality, codeclimate
sonar-scala
A free and open-source SonarQube plugin for static code analysis of Scala projects.
Stars: ✭ 113 (-22.07%)
Mutual labels:  quality, coverage
code-coverage-action
GitHub Action that generates code coverage reports
Stars: ✭ 28 (-80.69%)
Mutual labels:  coverage, github-actions
codeclimate-eslint
Code Climate Engine for ESLint
Stars: ✭ 86 (-40.69%)
Mutual labels:  quality, codeclimate
javascript-test-reporter
DEPRECATED Code Climate test reporter client for JavaScript projects
Stars: ✭ 68 (-53.1%)
Mutual labels:  quality, codeclimate
jacoco-badge-generator
Coverage badges, and pull request coverage checks, from JaCoCo reports in GitHub Actions
Stars: ✭ 53 (-63.45%)
Mutual labels:  coverage, github-actions
metadata-action
GitHub Action to extract metadata (tags, labels) from Git reference and GitHub events for Docker
Stars: ✭ 492 (+239.31%)
Mutual labels:  github-actions
chrome-addon
☁ GitHub action to upload addon to Chrome
Stars: ✭ 53 (-63.45%)
Mutual labels:  github-actions
auto-label-merge-conflicts
Github action to auto-label PRs with merge conflicts
Stars: ✭ 40 (-72.41%)
Mutual labels:  github-actions
actions-mention-to-slack
Github Action for convert Github mention to Slack mention.
Stars: ✭ 52 (-64.14%)
Mutual labels:  github-actions
public-ip
Queries GitHub actions runner's public IP address
Stars: ✭ 64 (-55.86%)
Mutual labels:  github-actions

codeclimate-action

Test Coverage Build Status MIT License

A GitHub action that publishes your code coverage to Code Climate.

Warning

Please upgrade to v3.1.1 (or higher) immediately. v3.1.0 was recently broken inadverdently, and the only fix is to upgrade your action to v3.1.1 or higher. Please see #626 for more details.

Usage

This action requires that you set the CC_TEST_REPORTER_ID environment variable. You can find it under Repo Settings in your Code Climate project.

Inputs

Input Default Description
coverageCommand The actual command that should be executed to run your tests and capture coverage.
workingDirectory Specify a custom working directory where the coverage command should be executed.
debug false Enable Code Coverage debug output when set to true.
coverageLocations Locations to find code coverage as a multiline string.
Each line should be of the form <location>:<type>.
type can be any one of clover, cobertura, coverage.py, excoveralls, gcov, gocov, jacoco, lcov, lcov-json, simplecov, xccov. See examples below.
prefix undefined See --prefix
verifyDownload true Verifies the downloaded Code Climate reporter binary's checksum and GPG signature. See Verifying binaries

Example

steps:
  - name: Test & publish code coverage
    uses: paambaati/[email protected]
    env:
      CC_TEST_REPORTER_ID: <code_climate_reporter_id>
    with:
      coverageCommand: npm run coverage
      debug: true

Example with only upload

When 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.

steps:
  - name: Test & publish code coverage
    uses: paambaati/[email protected]
    env:
      CC_TEST_REPORTER_ID: <code_climate_reporter_id>

Example with wildcard (glob) pattern

This action supports basic glob patterns to search for files matching given patterns. It uses @actions/glob to expand the glob patterns.

steps:
  - name: Test & publish code coverage
    uses: paambaati/[email protected]
    env:
      CC_TEST_REPORTER_ID: <code_climate_reporter_id>
    with:
      coverageCommand: yarn run coverage
      coverageLocations: |
        ${{github.workspace}}/*.lcov:lcov

Example with Jacoco

steps:
  - name: Test & publish code coverage
    uses: paambaati/[email protected]
    env:
      # Set CC_TEST_REPORTER_ID as secret of your repo
      CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
      JACOCO_SOURCE_PATH: "${{github.workspace}}/src/main/java"
    with:
      # The report file must be there, otherwise Code Climate won't find it
      coverageCommand: mvn test
      coverageLocations: ${{github.workspace}}/target/site/jacoco/jacoco.xml:jacoco

Example of multiple test coverages for monorepo with Jest

Let'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.

"scripts": {
  "coverage": "yarn client coverage && yarn server coverage"
}

First 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 —

SF:src/server.ts

If 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 —

// server/jest.config.js
module.exports = {
  ...
  coverageReporters: [['lcov', { projectRoot: '..' }]]
  ...
};
steps:
  - name: Test & publish code coverage
    uses: paambaati/[email protected]
    env:
      CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
    with:
      coverageCommand: yarn run coverage
      coverageLocations: |
        ${{github.workspace}}/client/coverage/lcov.info:lcov
        ${{github.workspace}}/server/coverage/lcov.info:lcov

Example projects

  1. paambaati/websight

  2. MartinNuc/coverage-ga-test

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].