Skip to content

All in One Code Coverage, bundle size, and other reports tracking tool. Self hosted codecov solution.

License

Notifications You must be signed in to change notification settings

kevincobain2000/action-coveritup

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

coveritup app url

The Hassle-Free Code Coverage and Metrics Tracking Tool
A CodeCov and SonarQube alternative.

DEMO!

coveritup app url

Action and Self Hosted app for uploading Code Metrics to coveritup.app

CoverItUp - All in one code coverage and badges tool. | Product Hunt



Add Progress To your README

      


Add Badges To your README

npm-install-time npm-build-time go-build-time

coverage go-binary-size

go-test-run-time go-mod-dependencies go-sec-issues go-lint-errors


Add Widgets To your README

npm-install-time npm-build-time go-build-time go-test-run-time coverage go-binary-size go-mod-dependencies go-sec-issues go-lint-errors


Quick Setup: Quickly set up code coverage or other useful metrics on your project.

Self-Hosted: Also available. Host your code coverage server.

Multiple: Not just code coverage. Track multiple types of reports, such as coverage, lint, bundle size, complexity, etc.

Pull Request Comments: Comment on pull requests with the summary report for diff.

Shield: Get shields for your README.md

Charts: Visualize your reports with charts. Report trends over time by branch and user.

Read on Medium - Revolutionizing Code Tracking for Developers, Use Linters the Right way

Examples - Pull Request Comments

Do a CF (Continuous Feedback) on your pull requests. Comment on PR with the summary report for diff.

See this pull request for example: #15

Examples - Embedding

Coverage Trends for branch master

coverage

Build Times Trends for branch master

build-time

More Examples

Code Coverage on same metric

go-mod-dependencies,go-sec-issues,go-lint-errors

build-time,unit-test-run-time

Code Coverage on branch trends

coverage

Build Time on branch trends

build-time

More Examples

Step 1) Using Action

Before using this action, enable Github Actions

Github Settings

  • Read and write permission
  • Allow Github Actions to create and approve pull requests

Step 2) Add to your workflow

Scores example code coverage

    # Example: Clover
    - run: curl -sLk https://raw.githubusercontent.com/kevincobain2000/cover-totalizer/master/install.sh | sh
    - uses: kevincobain2000/action-coveritup@v2
      with:
        type: coverage
        command: ./cover-totalizer coverage.xml

    # Finally comment on PR
    - uses: kevincobain2000/action-coveritup@v2
      with:
        pr_comment: true
        # optional
        ## report only these types on PR comment, empty means all
        types: coverage,go-sec-issues,go-lint-errors
        # optional
        ## report only these types after 1st comment
        # 1st comment will have all types or types specified in `types`
        # 2nd comment onwards will have only these types
        diff_types: coverage

Time taken

    # Example: Go
    - uses: kevincobain2000/action-coveritup@v2
      with:
        type: go-build-time
        command: go build main.go
        record: runtime

    # Example: NPM
    - uses: kevincobain2000/action-coveritup@v2
      with:
        type: npm-build-time
        command: npm run build
        record: runtime

    # Finally comment on PR
    - uses: kevincobain2000/action-coveritup@v2
      with:
        pr_comment: true

Bundle sizes

    # Example: Go
    - uses: kevincobain2000/action-coveritup@v2
      with:
        type: go-binary-size
        command: du -sk main | awk '{print $1}'

    # Example: NPM
    - uses: kevincobain2000/action-coveritup@v2
      with:
        type: npm-modules-size
        command: du -sm node_modules/ | awk '{print $1}'

    # Example: PHP
    - uses: kevincobain2000/action-coveritup@v2
      with:
        type: php-vendor-size
        command: du -sm vendor/ | awk '{print $1}'

    # Finally comment on PR
    - uses: kevincobain2000/action-coveritup@v2
      with:
        pr_comment: true

Counts

    # Example: Go
    - uses: kevincobain2000/action-coveritup@v2
      with:
        type: go-mod-dependencies
        command: go list -m all|wc -l|awk '{$1=$1};1'

    # Example: PHP
    - uses: kevincobain2000/action-coveritup@v2
      with:
        type: composer-dependencies
        command: composer show -i --name-only 2>/dev/null | wc -l | awk '{print $NF}'

    # Finally comment on PR
    - uses: kevincobain2000/action-coveritup@v2
      with:
        pr_comment: true

Step 3) Embedding badges and charts

Navigate to your repo and obtain embeding code for badges and charts. https://coveritup.app/readme?org=kevincobain2000&repo=action-coveritup&branch=master


Compliance

Delete just one type

    - uses: kevincobain2000/action-coveritup@v2
      with:
        destroy: true
        type: npm-modules-size

Delete everything

    - uses: kevincobain2000/action-coveritup@v2
      with:
        destroy: true

How this action uses github.token

github.token from your action is sent to the server as an Authorization header. The expiration of github.token is until the workflow is running. The token is used to verify if the request has originated from the correct org, repo and commit author. https://coveritup.app doesn't store the token. You can see usage in action.yml file

Development notes

# for backend
cd app/
air # or go run main.go

# for frontend
cd app/fronend
npm install
npm run dev

Self Hosting Options

Just the Api

Download the binary from releases

Build from source (with UI)

git clone https://github.com/kevincobain2000/action-coveritup
cd app
cp frontend/.env.example frontend/.env
./build.sh
./main

CHANGE LOG

  • v1.0 - Initial release with self hosted and action.
  • v2.0 - Better action that wraps the command.
  • v2.4 - Smoothed bar charts.