Giter VIP home page Giter VIP logo

codecoveragesummary's Introduction

About Me

Dave Murray's Dev Card

A long time ago, in a galaxy far, far away a small boy loved his 8-bit home micro. He learned to write games in BASIC and Z80 assembly language and dreamed of building his own astromech droid...

Hi, I'm Dave and I write code. In my career I've created solutions for a wide variety of industries. From industrial control systems for the electronics and automotive industries to GIS and statistical analysis software for the oil industry, software for call centres, the NHS and an SaaS ERP system for the catering industry. I currently work for a global engineering firm as lead developer for a suite of mobile apps built with Xamarin and provide support to other teams building .NET solutions.

When not writing code, my passion is watching motorcycle racing. From MotoGP to World Superbike, British Superbike, Dakar and the Africa Eco Race, where I sponsored a team in 2020, if it has two wheels and an engine I'll watch it race!๐Ÿ๐Ÿ๐Ÿ

  • ๐Ÿ‘จโ€๐Ÿ”ง I mostly work with C# and Xamarin
  • ๐Ÿ“ƒ I write a blog called Sailing the Sharp Sea
  • ๐Ÿ‘จโ€๐Ÿ’ป You can find me on GitHub
  • ๐Ÿ‘‹ Or LinkedIn
  • ๐ŸŽฌ Fun Fact: I was an extra in Blackadder!

Irongut's GitHub Stats

Featured Articles

Secure your workflows with StepSecurity Harden Runner ย  Secure your .NET builds with StepSecurity and GitHub Actions

codecoveragesummary's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar irongut avatar jondewoo avatar joshjohanning avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

codecoveragesummary's Issues

What does complexity mean?

Feature Request

Hi there! Great tool you are building here! Much appreciated. Looking at the documentation in the README.md, the example output has a measure of complexity:

Company.Example: Line Rate = 83%, Branch Rate = 69%, Complexity = 671, โœ”
Company.Example.Library: Line Rate = 27%, Branch Rate = 100%, Complexity = 11, โŒ
Summary: Line Rate = 83% (1212 / 1460), Branch Rate = 69% (262 / 378), Complexity = 682, โœ”
Minimum allowed line rate is 50% 

I am wondering what does it mean and how it is measured?

The reason I am asking is because I ran the coverage report for the first time in my repo and I have zeroes for the Branch Rate and Complexity (please see the following). I am not sure if this is by design or I did something wrong.

Package Line Rate Branch Rate Complexity Health
some.package.a 77% 0% 0 โœ”
some.package.b 20% 0% 0 โŒ
Summary 80% (80 / 100) 0% (0 / 0) 0 โœ”

Expected Behaviour

It would be great if the documentation can be updated on complexity and branch rate as well.

Thanks!

Allow hiding some output values

Feature Request

Not all tools output Branch Rate & Complexity even though they use Cobertura format, see #20. Options to hide the missing values would be useful for compatibility with coverage.py & similar tools.

Since Line Rate is used for the badge, health indicators & failing the workflow an option to hide it would make no sense.

Expected Behaviour

  • Add option hide_branch_rate, default false
  • Add option hide_complexity, default false

Additional Context

Linked To

#17 Test compatibility with other tools
#20 What does complexity mean?

a97456f356334e28810e5b3ae645ffa7cbe2d0fe

Feature Request

Provide a short description of the problem you are trying to solve or feature you would like to see.

Expected Behaviour

Provide a detailed description of how the feature should work.

Additional Context

Add any other context about the feature here.

Linked To

List any issues linked to this feature request.

CCS fails with simplecov & simplecov-cobertura default settings

Bug Report

CCS fails with simplecov & simplecov-cobertura on default settings because branch metrics are not reported.

See posts by @pboling in #17 (comment)

Workflow File

coverage.yml

      - name: Code Coverage Summary Report
        uses: irongut/[email protected]
        with:
          filename: ./coverage/coverage.xml
          badge: true
          fail_below_min: true
          format: markdown
          hide_branch_rate: false
          hide_complexity: true
          indicators: true
          output: both
          thresholds: '95 97'
        continue-on-error: ${{ matrix.experimental != 'false' }}

Workflow Run

Actions Log

Run irongut/CodeCoverageSummary@v1.[2](https://github.com/oauth-xx/oauth2/runs/5226726966?check_suite_focus=true#step:9:2).0
  with:
    filename: ./coverage/coverage.xml
    badge: true
    fail_below_min: true
    format: markdown
    hide_branch_rate: false
    hide_complexity: true
    indicators: true
    output: both
    thresholds: 95 97
  env:
    CC_TEST_REPORTER_ID: ***
    GIT_COMMIT_SHA: 5e7798ac8bfdc4f[3](https://github.com/oauth-xx/oauth2/runs/5226726966?check_suite_focus=true#step:9:3)d8537d[4](https://github.com/oauth-xx/oauth2/runs/5226726966?check_suite_focus=true#step:9:4)23af23be[5](https://github.com/oauth-xx/oauth2/runs/5226726966?check_suite_focus=true#step:9:5)f33ec[6](https://github.com/oauth-xx/oauth2/runs/5226726966?check_suite_focus=true#step:9:6)81
    GIT_BRANCH: 1-4-stable
/usr/bin/docker run --name ghcrioirongutcodecoveragesummaryv120_db1[7](https://github.com/oauth-xx/oauth2/runs/5226726966?check_suite_focus=true#step:9:7)64 --label 7db2d7 --workdir /github/workspace --rm -e CC_TEST_REPORTER_ID -e GIT_COMMIT_SHA -e GIT_BRANCH -e INPUT_FILENAME -e INPUT_BADGE -e INPUT_FAIL_BELOW_MIN -e INPUT_FORMAT -e INPUT_HIDE_BRANCH_RATE -e INPUT_HIDE_COMPLEXITY -e INPUT_INDICATORS -e INPUT_OUTPUT -e INPUT_THRESHOLDS -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_RUN_ATTEMPT -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_REF_NAME -e GITHUB_REF_PROTECTED -e GITHUB_REF_TYPE -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_ARCH -e RUNNER_NAME -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/oauth2/oauth2":"/github/workspace" ghcr.io/irongut/codecoveragesummary:v1.2.0  "--files" "./coverage/coverage.xml" "--badge" "true" "--fail" "true" "--format" "markdown" "--hidebranch" "false" "--hidecomplexity" "true" "--indicators" "true" "--output" "both" "--thresholds" "[9](https://github.com/oauth-xx/oauth2/runs/5226726966?check_suite_focus=true#step:9:9)5 97"
Code Coverage File: ./coverage/coverage.xml
Parse Error: Sequence contains no elements
Error: System.NullReferenceException - Object reference not set to an instance of an object.

Expected Behavior

CCS should report the metrics which are present and fail more gracefully if any required part of the coverage file is missing.

Workaround

Enable Branch coverage.
Primary Coverage should be set to 'line' (the default).

See simplecov docs.

Linked To

#17 Test compatibility with other tools

code coverage 0% and don't know how can i debug

Bug Report

Provide a short description of the bug with any error message.

Workflow File

    - name: Configure CMake
      # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
      # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
      run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

    - name: Build
      # Build your program with the given configuration
      run: cmake --build ${{github.workspace}}/build -j8 --config ${{env.BUILD_TYPE}}

    - name: Test
      working-directory: ${{github.workspace}}/build
      run: ./bin/unit_tests --gtest_output=xml:${{github.workspace}}/build/report/

    - name: Install gcovr
      run: sudo apt-get install -y gcovr

    - name: Generate cubertura xml by gcovr
      run: gcovr --xml coverage.cobertura.xml --xml-pretty

    - name: Code Coverage Summary Report
      uses: irongut/[email protected]
      with:
        filename: coverage.cobertura.xml
        badge: true
        format: 'markdown'
        output: 'both'

    - name: Add Coverage PR Comment
      uses: marocchino/sticky-pull-request-comment@v2
      if: github.event_name == 'pull_request'
      with:
        recreate: true
        path: code-coverage-results.md

Actions Log

Run gcovr --xml coverage.cobertura.xml --xml-pretty
  gcovr --xml coverage.cobertura.xml --xml-pretty
  shell: /usr/bin/bash -e {0}
  env:
    BUILD_TYPE: Release
1s
Run irongut/[email protected]
  with:
    filename: coverage.cobertura.xml
    badge: true
    format: markdown
    output: both
    fail_below_min: false
    indicators: true
    thresholds: 50 75
  env:
    BUILD_TYPE: Release
/usr/bin/docker run --name ghcrioirongutcodecoveragesummaryv110_7058e7 --label e28490 --workdir /github/workspace --rm -e BUILD_TYPE -e INPUT_FILENAME -e INPUT_BADGE -e INPUT_FORMAT -e INPUT_OUTPUT -e INPUT_FAIL_BELOW_MIN -e INPUT_INDICATORS -e INPUT_THRESHOLDS -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_RUN_ATTEMPT -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_REF_NAME -e GITHUB_REF_PROTECTED -e GITHUB_REF_TYPE -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_ARCH -e RUNNER_NAME -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/geomcpp/geomcpp":"/github/workspace" ghcr.io/irongut/codecoveragesummary:v1.1.0  "coverage.cobertura.xml" "--badge" "true" "--fail" "false" "--format" "markdown" "--indicators" "true" "--output" "both" "--thresholds" "50 75"
Code Coverage File: coverage.cobertura.xml
![Code Coverage](https://img.shields.io/badge/Code%20Coverage-0%25-critical?style=flat)

Package | Line Rate | Branch Rate | Complexity | Health
-------- | --------- | ----------- | ---------- | ------
**Summary** | **0%** (0 / 0) | **0%** (0 / 0) | 0 | โŒ

1s
Run marocchino/sticky-pull-request-comment@v2
  with:
    recreate: true
    path: code-coverage-results.md
    append: false
    delete: false
    hide_details: false
    hide: false
    hide_and_recreate: false
    hide_classify: OUTDATED
    GITHUB_TOKEN: ***
  env:
    BUILD_TYPE: Release

Expected Behavior

show the correct coverage report

Additional Context

I try the commond
``gcovr --xml coverage.cobertura.xml --xml-pretty
in the root directory of my local environmen.
the file "coverage.cobertura.xml" creates success.
I don't know how can i debug.

Lines with missing coverage

Feature Request

I'd love to see a new table column containing ranges of uncovered lines for the given file, like for example: 1-14, 54-77, 104-105.

Something very useful would then also be if they were linked, so I could click them and be taken to each range of lines, highlighted.

Running on ARM64 fails

Bug Report

when migrating from x86_64 to arm64 (aws graviton) the build started to get the following error

Workflow File

      - name: Code Coverage Summary Report
        uses: irongut/[email protected]
        with:
          filename: coverage.cobertura.xml
          badge: true
          fail_below_min: true
          format: markdown
          hide_branch_rate: false
          hide_complexity: true
          indicators: true
          output: both
          thresholds: '0 80'

Actions Log

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

Expected Behavior

Runs on arm as on x86

Additional Context

no

Linked To

none

System.OutOfMemoryException when generating a coverage summary

Bug Report

I'm trying to generate a coverage summary from a coverage report in cobertura format, produced using grcov, and this action fails with the error message "Parsing Error: Exception of type 'System.OutOfMemoryException' was thrown."

Workflow File

name: Coverage Report

# ...

env:
  RUSTFLAGS: -Dwarnings -Cinstrument-coverage
  # ...

jobs:
  coverage-report:
    runs-on: ubuntu-latest-32-cores
    steps:
      - name: Clone
        uses: actions/checkout@v2
      # ...
      - name: Install grcov
        run: cargo install grcov
      # ...
      - name: Gather Coverage Data
        run: cargo test
      - name: Generate Coverage Report
        run: grcov . -s . --binary-path ./target/debug/ -t cobertura --branch --ignore-not-existing -o ./target/debug/coverage.cobertura.xml
      - name: Produce Coverage Summary
        uses: irongut/[email protected]
        with:
          filename: target/debug/coverage.cobertura.xml
          badge: true
          format: 'markdown'
          output: 'both'
      - name: Add Coverage PR Comment
        uses: marocchino/sticky-pull-request-comment@v2
        if: github.event_name == 'pull_request'
        with:
          recreate: true
          path: code-coverage-results.md
      - name: Write to Job Summary
        run: cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY

Actions Log

From the "Produce Coverage Summary" step:

Coverage File: /github/workspace/target/debug/coverage.cobertura.xml
Parsing Error: Exception of type 'System.OutOfMemoryException' was thrown. - /github/workspace/target/debug/coverage.cobertura.xml
##[debug]Docker Action run completed with exit code 254

Expected Behavior

I expected the Action to generate a coverage summary without running out of memory.

Additional Context

The coverage report is for a large Rust project (~300k LoC).

Linked To

None.

Jest: Output File and Both Not Generating Markdown File

Bug Report

After I generate Jest coverage reports using the Cobertura reporter, this action is failing is failing to generate the markdown-formatted file code-coverage-results.md.

I was able to get the console output in the action logs while using output: both, but the markdown file code-coverage-results.md is never created when using either output: both or output: file.

The Jest project is nested under projectRoot/ui/

Test Coverage Command in package.json

"test:coverage": "jest src/ --coverage",

Coverage Reporter Config in Jest Config File

  // Indicates whether the coverage information should be collected while executing the test
  collectCoverage: false, // Overwritten by the pipeline

  // An array of glob patterns indicating a set of files for which coverage information should be collected
  collectCoverageFrom: [
    "src/**/*.ts",
    "!src/**/*.d.ts",
  ],

  // The directory where Jest should output its coverage files
  coverageDirectory: "coverage",

  // An array of regexp pattern strings used to skip coverage collection
  coveragePathIgnorePatterns: [
    "/node_modules/",
  ],

  // Indicates which provider should be used to instrument code for coverage
  // coverageProvider: "babel",

  // A list of reporter names that Jest uses when writing coverage reports
  coverageReporters: [
    // "json",
    "text",
    "lcov",
    // "clover",
    "cobertura",
  ],

Workflow File

  unit-test-ui:
    name: Run UI Unit Tests
    runs-on: ubuntu-latest
    defaults:
      run:
        working-directory: ./ui
    steps:
      - name: Checkout Code
        uses: actions/checkout@v3
      - name: Install Node Modules
        uses: ./.github/actions/install-node-modules
      - name: Build Application
        run: npm run build
      - name: Run Unit Tests
        run: npm run test:coverage
      - name: Upload Coverage Report
        uses: actions/upload-artifact@v3
        with:
          name: Coverage Reports
          path: ./ui/coverage/lcov-report
      - name: Generate Markdown Coverage Report
        uses: irongut/[email protected]
        with:
          filename: ./ui/coverage/cobertura-coverage.xml
          # badge: true
          # fail_below_min: true
          format: markdown
          # hide_branch_rate: false
          # hide_complexity: true
          indicators: true
          output: file
          thresholds: '70 85'
      - run: ls -la coverage
      - name: Send Coverage Markdown to Job Summary
        run: cat ./ui/coverage/code-coverage-results.md >> $GITHUB_STEP_SUMMARY

Actions Log

File-only Output

image

Expected Behavior

I expect the code-coverage-results.md file to be generated in the coverage/ folder when given a valid cobertura-coverage.xml file.

Additional Context

I checked the root of the project to see if the markdown file was generated there by accident somehow, but it was not.

Linked To

N/A

Publish releases to GitHub Container Registry

Feature Request

I'd love if you were able to publish this action to GitHub Marketplace. Published actions provide significant time savings for workflows since the container doesn't have to be built from scratch on every run.

In our workflows, the "publish unit tests result" action we use takes around 3 seconds to pull from the marketplace, whereas this action takes around 37 seconds to build from scratch.

Expected Behaviour

N/A

Additional Context

GitHub Documentation:
https://docs.github.com/en/actions/creating-actions/publishing-actions-in-github-marketplace

Another Project That Makes Use Of This:
https://github.com/EnricoMi/publish-unit-test-result-action

Linked To

N/A

Jacoco Code Coverage is getting reduced in github

I am using the Jacoco library to generate code coverage for my project, but my code coverage is getting reduced on Github.
If locally the coverage is 80% GitHub shows it as 75% or less. Does github execules or incules some others files resulting in less code coverage.

Can someone please explain this ?

Method Coverage

Feature Request

It would also be useful to have Method coverage reported by the tool.

Expected Behaviour

There would be an additional column that reports Method coverage

Additional Context

Similar to what is printed out by dotnet test:

Calculating coverage result...
Generating report './bin/test-results/coverage.cobertura.xml'

+------------------+--------+--------+--------+
| Module | Line | Branch | Method |
+------------------+--------+--------+--------+
| RCS.Libs.ArgUtil | 93.82% | 95.83% | 92.3% |
+------------------+--------+--------+--------+

+---------+--------+--------+--------+
| | Line | Branch | Method |
+---------+--------+--------+--------+
| Total | 93.82% | 95.83% | 92.3% |
+---------+--------+--------+--------+
| Average | 93.82% | 95.83% | 92.3% |
+---------+--------+--------+--------+

Document what the values mean

Feature Request

Add a description of Line Rate, Branch Rate & Complexity to the documentation. Probably as a wiki page to keep the readme clean.

Linked To

#20 What does complexity mean?

Glob Pattern Matching for multiple files

Feature Request

I would like to see the option to use Glob to indicate multiple files. This is because in my workflow I currently have created a workaround for this and would like to have my workflow more maintable.

Expected Behaviour

To be able to use ./IDesign/*/TestResults/coverage.cobertura.xml as input so that all test projects output are used.

Linked To

( #26 )

Add folding

Add folding sections similar to other report generation actions.

This could be an additional parameter (fold_coverage). For larger projects with lots of coverage, this would be convenient when posting the generated markdown as a comment on the PR.

Ex:
Code Coverage (badge) 20%

Coverage Report

// TODO: Add table here

Include Class Coverage

Feature Request

Class coverage metrics are included in the data, include them in the ouput.

Expected Behaviour

Include class metrics in the output, perhaps if a verbose mode flag is set.

Formats for text and markdown output tbd.

Additional Context

Collapsed sections might be good for markdown output.

Linked To

Add exclusion of files/directories

Feature Request

Allow for directories to be excluded/ignored from code coverage.
Provide a short description of the problem you are trying to solve or feature you would like to see.

Expected Behaviour

When a string is entered, the files/directories which meets this pattern (e.g. regex or gitignore pattern), these files will not be included in the coverage. This should support being in a list of strings with different patterns.

Additional Context

It's an issue I'm currently having, because I'm trying to exclude my EF Core Migrations from my code coverage to satisfy my team's requirements of

Get "Parse Error: Input string was not in a correct format." with MATLAB's Cobertura format code coverage file

Bug Report

Using a Cobertura XML report generated by MATLAB gives a "Parse Error: Input string was not in a correct format." Seems very similar to issue #9 . I suspect that MATLAB is not outputting something in the XML that you expect.

Workflow File

     # Publish code coverage results
      - name: Code Coverage Summary Report
        uses: irongut/[email protected]
        with:
          filename: report/coverage.xml     
          badge: true
          format: markdown

Actions Log

0s
Run irongut/CodeCoverageSummary@v[1](https://github.com/mathworks/climatedatastore/runs/7053609696?check_suite_focus=true#step:8:1).2.0
/usr/bin/docker run --name ghcrioirongutcodecoveragesummaryv[12](https://github.com/mathworks/climatedatastore/runs/7053609696?check_suite_focus=true#step:8:13)0_c10c9f --label 72882e --workdir /github/workspace --rm -e INPUT_FILENAME -e INPUT_BADGE -e INPUT_FORMAT -e INPUT_FAIL_BELOW_MIN -e INPUT_HIDE_BRANCH_RATE -e INPUT_HIDE_COMPLEXITY -e INPUT_INDICATORS -e INPUT_OUTPUT -e INPUT_THRESHOLDS -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_RUN_ATTEMPT -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_REF_NAME -e GITHUB_REF_PROTECTED -e GITHUB_REF_TYPE -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e GITHUB_STEP_SUMMARY -e RUNNER_OS -e RUNNER_ARCH -e RUNNER_NAME -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/climatedatastore/climatedatastore":"/github/workspace" ghcr.io/irongut/codecoveragesummary:v1.2.0  "--files" "report/coverage.xml" "--badge" "true" "--fail" "false" "--format" "markdown" "--hidebranch" "false" "--hidecomplexity" "false" "--indicators" "true" "--output" "console" "--thresholds" "50 75"
Code Coverage File: report/coverage.xml
Parse Error: Input string was not in a correct format.
Error: System.NullReferenceException - Object reference not set to an instance of an object.

Expected Behavior

A coverage report

Additional Context

I attached a .txt file with the XML generated by MATLAB that's supposed to be Cobertura format. If you feel that the MATLAB XML generated is in error, please let me know and I'll file a bug report with the MATLAB team.

Linked To

Related issue in my repo

Implement StepSecurity Secure Workflows (policy)

Feature Request

Implement StepSecurity Secure Workflows Harden Runner recommendations.

Expected Behaviour

Workflows will be updated following the recommendations.

Additional Context

Actions not currently in the StepSecurity token permission database:

  • samspills/assign-pr-to-author

Linked To

#41 GITHUB_TOKEN permissions used by this action
#49 Implement StepSecurity Secure Workflows (audit)

Parse error on gcovr xml file

Bug Report

Using gcovr cobertura format:

Parse Error: Input string was not in a correct format.

Workflow File

Before action step:

gcovr -r src/ --xml-pretty -o coverage.xml
    - name: Code Coverage Summary Report (data)
      uses: irongut/[email protected]
      with:
        filename: coverage.xml
        output: 'both'

Actions Log

Run irongut/[email protected]
/usr/bin/docker run --name ghcrioirongutcodecoveragesummaryv102_3f9672 --label e1cc51 --workdir /github/workspace --rm -e PYTHONIOENCODING -e PIP_DOWNLOAD_CACHE -e pythonLocation -e LD_LIBRARY_PATH -e INPUT_FILENAME -e INPUT_OUTPUT -e INPUT_BADGE -e INPUT_FORMAT -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_RUN_ATTEMPT -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_NAME -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/redis-ipc/redis-ipc":"/github/workspace" ghcr.io/irongut/codecoveragesummary:v1.0.2  "coverage.xml" "--badge" "false" "--format" "text" "--output" "both"
Code Coverage File: coverage.xml
Parse Error: Input string was not in a correct format.
Error: Parsing code coverage file.

Expected Behavior

A coverage report for the following steps. <dry laughter>

Additional Context

Full workflow logs and yaml are all here with coverage data artifact.

I just updated to v1.0.3 while debugging, although the container still says v1.0.2 (maybe your new package isn't fully deployed yet?). I tried fixing the (missing) package name in the coverage data but that didn't help, and I don't have much error detail in my logs. Thanks!

Linked To

issue with glob patterns not finding files

Bug Report

I have been unable to get this action to work when dealing with files I downloaded from GitHub Actions artifacts that were uploaded in a previous job step. Even though I can use a plain ls command to list the files as expected, no filename param I've tried works to get this Action to pick up the files. Am I missing or misunderstanding something? Please let me know if there is any more context/detail I can add that will be helpful!

Workflow File

# This gets run in a parallel matrix setup, so we will end up with multiple coverage files uploaded as artifacts
test:
    # Rspec is configured to output to `coverage/coverage.xml` 
    - name: run rspec
       run: bundle exec rspec

    # Upload coverage output as an artifact so we can download them all later
    - name: Upload Coverage Output
      uses: actions/upload-artifact@v2
      with:
          name: coverage-output-rspec-${{ matrix.ci_node_index }}.coverage.xml
          path: coverage/coverage.xml

# Now lets download the coverage file artifacts and use them!
do_coverage_stuff:
  needs: test
  runs-on: ubuntu-latest
  steps:
      - name: Download Coverage Outputs
        uses: actions/download-artifact@v3
        with:
            path: artifacts

      # this shows that I have...
      # coverage-output-rspec-0.coverage.xml
      # coverage-output-rspec-1.coverage.xml
      # ...
      # coverage-output-rspec-N.coverage.xml
      - name: list artifacts
        run: ls artifacts

      - name: Code Coverage Report
        uses: irongut/[email protected]
        with:
            # I have tried...
            # artifacts/*.xml
            # artifacts/*.coverage.xml
            # **/*.xml
            #
            # to no avail
            # I've also tried downloading the artifacts to the working directory instead of `./artifacts`
            filename: artifacts/coverage-output-rspec-0.coverage.xml
            badge: true
            fail_below_min: false
            format: markdown
            hide_branch_rate: false
            hide_complexity: true
            indicators: true
            output: both
            thresholds: '50 60'

Actions Log

Run ls
  ls
  shell: /usr/bin/bash -e {0}
coverage-output-rspec-0.coverage.xml
coverage-output-rspec-1.coverage.xml
coverage-output-rspec-10.coverage.xml
coverage-output-rspec-11.coverage.xml
coverage-output-rspec-12.coverage.xml
coverage-output-rspec-13.coverage.xml
coverage-output-rspec-14.coverage.xml
coverage-output-rspec-2.coverage.xml
coverage-output-rspec-3.coverage.xml
coverage-output-rspec-4.coverage.xml

... snip ...

Run irongut/[email protected]
  
... snip ...

Error: No files found matching glob pattern.

Expected Behavior

CodeCoverageSummary should be able to find and process the files in the working directory.

GITHUB_TOKEN permissions used by this action

At https://github.com/step-security/secure-workflows we are building a knowledge-base (KB) of GITHUB_TOKEN permissions needed by different GitHub Actions. When developers try to set minimum token permissions for their workflows, they can use this knowledge-base instead of trying to research permissions needed by each GitHub Action they use.

Below you can see the KB of your GITHUB Action.

name: 'Code Coverage Summary'
 # irongut/CodeCoverageSummary
# GITHUB_TOKEN not used

If you think this information is not accurate, or if in the future your GitHub Action starts using a different set of permissions, please create an issue at https://github.com/step-security/secure-workflows/issues to let us know.

This issue is automatically created by our analysis bot, feel free to close after reading :)

References:

GitHub asks users to define workflow permissions, see https://github.blog/changelog/2021-04-20-github-actions-control-permissions-for-github_token/ and https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token for securing GitHub workflows against supply-chain attacks.

Setting minimum token permissions is also checked for by Open Source Security Foundation (OpenSSF) Scorecards. Scorecards recommend using https://github.com/step-security/secure-workflows so developers can fix this issue in an easier manner.

Duplicate references with different code coverage results

Bug Report

I love the short code coverage report with every little bit of information that we need.

However when I get the results they make no sense. I seem to have the same namespace listed more than once and have different coverage results. It's as though it isn't combining the multiple coverage reports properly.

Workflow File

- name: ReportGenerator
        uses: irongut/[email protected]
        with:
          filename: src/**/TestResults/*/coverage.cobertura.xml
          badge: true
          format: markdown
          indicators: true
          output: both

Actions Log

I couldn't easily seperate this - private repo.

Expected Behavior

A clear and concise description of what you expected to happen.
I would expect to see just 1 line for each namespace and 1 line for each class
Currently I get this list repeated several times.

image
Figure: Amazon.Client listed at least 3 times (Blurred for privacy)

Additional Context

Add any other context about the problem here.

Linked To

List any issues linked to this bug.

Add ability to fail a workflow

Feature Request

Add the ability to fail a workflow if the total coverage is below the lower threshold (when badge is red, default 50%).

Expected Behaviour

  • An optional parameter will enable the Action to fail the workflow if the total coverage is below the lower threshold.
  • The action should still output the coverage summary when failing the workflow.
  • Use the lower threshold also used for badges & health indicators.

Additional Context

Linked To

#14 Add a health indicator for each package
#15 Add ability to change badge + health indicator thresholds

Update to .Net 6

Feature Request

.Net 6 has just been released, update CCS to .Net 6.

.Net 6 Release Notes

Note: Visual Studio 2022 or VS Code with the latest version of the C# extension are required for .Net 6!

Docker Images

Additional Context

Both the csproj and the dockerfile need to be updated.

Linked To

SimpleCov solution

Feature Request

I already face the problem of using simple coverage and this action but i found a complete solution

Expected Behaviour

Update the wiki.

As you mentioned in the description, this action is waiting for a Cobertura file, so why not tell simplecov to generate a Cobertura file?
I found this gem https://github.com/dashingrocket/simplecov-cobertura
just follow the instructions to setup and it's done.

example of config into spec_helper.rb

require 'simplecov-cobertura'
SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new([
  SimpleCov::Formatter::SimpleFormatter,
  SimpleCov::Formatter::CoberturaFormatter,
  SimpleCov::Formatter::HTMLFormatter
])

above config would generate HTML, and cobertura files.

example of action config

     # Add or replace test runners here
      - name: Build and test with rspec
        run: |
          COVERAGE=true bundle exec rspec spec

      - name: Code Coverage Summary
        uses: irongut/[email protected]
        with:
          filename: ./coverage/coverage.xml
          badge: true
          hide_branch_rate: true
          hide_complexity: true
          format: markdown
          indicators: true
          output: both

image

Additional Context

Linked To

Badge Showing Coverage % for main branch for README.md file?

Looking at the existing badge support I see it is generating an image like this one:

![Code Coverage](https://img.shields.io/badge/Code%20Coverage-97%25-success?style=flat)

This works fine in the PR comment but I'd like to include a badge in my project README with the latest coverage value from the main branch. Is this something this tool can help with, or does that require some separate service that would host the image?

Looking at the various shields.io branches for coverage, none of these seem like they would work with CodeCoverageSummary:
https://shields.io/category/coverage

Thanks for any tips.

Add ability to add summary to a section on the left (runs?) on github actions page

Feature Request

It would be nice if we could output a summary on the side (not sure of the term) on github actions, much like our unit test task does
image

As you can see on the left (bit I mean above) our unit test task outputs a section with the results, and it would be nice if the code coverage summary also wrote out to that section there too.

Expected Behaviour

Have a property that can be set to indicate if the summary should be output as a summary on the side

Not working with JEST

I am using JEST for testing and I am generating the coverage report in cobertura format, and this error shows up when the workflow is run.

Coverage File: /github/workspace/coverage/cobertura-coverage.xml
Parsing Error: No package data found - /github/workspace/coverage/cobertura-coverage.xml

yml workflow file:

name: Node tests (with coverage)
on:
  push:
    branches:
      - '*'
      - '!master'
      - '!SS-test'
      - '!SS-UAT-test'
      - '!PS-prod'
  pull_request:
    branches:
      - 'master'
jobs:
  unit_tests:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      
      - name: Setup node
        uses: actions/setup-node@v1
        with:
          node-version: 14

      - name: Install npm packages
        run: npm ci
      
      - name: Test 
        run: npm run test:coverage

      - name:
        uses: actions/upload-artifact@v3
        with:
          name: my-artifact
          path: "coverage/" # or path/to/artifact

      - name: Code Coverage Report
        uses: irongut/[email protected]
        with:
          filename: "/coverage/cobertura-coverage.xml"
          badge: true
          fail_below_min: true
          format: markdown
          hide_branch_rate: false
          hide_complexity: true
          indicators: true
          output: both
          thresholds: '60 80'

could someone please help me figure out whats going wrong

Fail PR's that decrease coverage

Feature Request

I'd like to be fail PR's with decreasing coverage from the base branch. Ideally a configurable % change would be ideal.

Expected Behaviour

If a PR decreases test coverage by more than a prescribed amount, the PR should be rejected.

Restrict token permissions for Auto Assign PR

Feature Request

The Auto Assign PR workflow doesn't have GitHub token permissions specified because it uses an Action not in the StepSecurity database.

Expected Behaviour

All workflows should restrict the GitHub token permissions.

Additional Context

Linked To

#49 Implement StepSecurity Secure Workflows (audit)
#51 Implement StepSecurity Secure Workflows (policy)

Make Github action to work in pipelines using Windows images

Feature Request

I want to be able to use this Github action in pipelines that uses Windows images.

Expected Behaviour

I expect the action to work as intended. At the moment in Windows-based image pipelines, the next error is shown: "Container action is only supported on Linux".

image

Additional Context

Github pipeline example:

jobs:
  build:
    runs-on: windows-latest
    steps:
    ...
    - name: Code Coverage Report
      uses: irongut/[email protected]
      with:
        filename: coverage.cobertura.xml
        badge: true
        fail_below_min: true
        format: markdown
        hide_branch_rate: false
        hide_complexity: true
        indicators: true
        output: both
        thresholds: '60 80'

Linked To

List any issues linked to this feature request.

xml bug plus feature xover

Bug Report

Summary report is created, but branch rate is zero ("0"). Line rate looks okay.

Workflow File

see the logs and coverage workflow on this PR

Feature Bits

This is trying to process the output (of my cleaned up fork) of lcov-to-cobertura-xml

Wrinkle 2 is that ^^ is the only convenient tool to process clang source-based coverage output => llvm-cov => lcov.info (tracefile format) then lcov_cobertura => xml format

coverage.xml.txt

Test compatibility with other tools

Feature Request

CCS has been tested with Coverlet and gcov, test with other tools that output Cobertura format.

Expected Behaviour

Obtain sample Coberura output from as many testing tools as possible, CCS should parse them correctly.

Additional Context

Linked To

#20 What does complexity mean? (issue with coverage.py)
#22 Allow hiding some output values

Add precision option for reported percentages

Feature Request

Reported percentages are rounded to whole numbers which can lead to confusion if a percentage is rounded up to apparently meet a threshold but the package is reported as failing to meet it because the calculation uses the full floating point number. A precision option would allow users to choose how many decimal places they wish to see.

Expected Behaviour

  • Percentages in results will be displayed with 0 - 2 decimal places depending on setting; default 0.
  • Setting negative values will result in 0 decimal places.
  • Setting precision higher than 2 will result in 2 decimal places.

Additional Context

Based on sample outputs different tools record metrics with different precision in the coverage file. The most common seems to be 4 decimal places, which translates to 2 decimal places for percentages. Consider rounding all values on reading to 4 decimal places or based on this setting.

Linked To

#68 Coverage percentage is wrong

Support for more than 1 cobertura.xml file

Feature Request

I currently have a action.yml file that will run dotnet test on a .NET 5 project. I have two tests projects, and this will in turn create two separate cobertura.xml files.

As you can see in my .yml file below, I will copy both files with the 'cp' command, however, only one of them will be picked up, since I need to specify one particular file. I would like to be able to either: a) consolidate my two xml files into one, or b) be able to specify more than 1 xml file in the summary step (which would require your action to somehow merge the two or more files into one single file).

action.yml

name: .Net 5 CI Build

on:
  workflow_dispatch:
  pull_request:
    branches: [ master ]

env:
  Database:ConnectionString: ${{ secrets.SQL_CONNECTIONSTRING }}

jobs:
  build:
    runs-on: ubuntu-latest
    name: CI Build
    steps:
    - name: Az login
      uses: azure/login@v1
      with:
        creds: ${{ secrets.AZURE_CREDENTIALS }}

    - name: Checkout
      uses: actions/checkout@v2

    - name: Setup .NET
      uses: actions/setup-dotnet@v1
      with:
        dotnet-version: 5.0.x

    - name: Restore Dependencies
      run: dotnet restore

    - name: Build
      run: dotnet build --configuration Release --no-restore

    - name: Test
      run: dotnet test --configuration Release --no-build --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./coverage

    - name: Copy Coverage To Predictable Location
      run: cp -n coverage/**/coverage.cobertura.xml coverage/

    - name: Code Coverage Summary Report
      uses: irongut/[email protected]
      with:
        filename: coverage/coverage.cobertura.xml
        badge: true
        format: 'markdown'
        output: 'both'

    - name: Add Coverage PR Comment
      uses: marocchino/sticky-pull-request-comment@v2
      if: github.event_name == 'pull_request'
      with:
        recreate: true
        path: code-coverage-results.md

    - name: AZ logout
      run: |
        az logout

Expected Behaviour

Support for more than 1 cobertura.xml file in CodeCoverageSummary action.

Add summary to a PR

Feature Request

Add the code coverage summary to a pull request without needing another Action. This could be optional.

Using Octokit this should be straightforward, if run from a PR the id of the PR can be obtained from the runner environment. An optional id parameter could allow posting to a PR when not run from a PR (e.g. manual run).

Expected Behaviour

Posts the coverage summary to a PR in a similar way to the marocchino/sticky-pull-request-comment action.

Additional Context

Linked To

Allow defining filters for including or excluding assemblies, classes, and files from the final coverage report

Feature Request

I want to be able to include or exclude assemblies, classes, or files from the coverage report.

Expected Behaviour

Provide a detailed description of how the feature should work.

I am thinking to have the next options which allow for inclusion or exclusion of .

Assembly filters: Optional list of assemblies that should be included or excluded in the report.

assemblyfilters:+*Service;+*Controller // Include any assembly which is post-fixed by the term "Service" or "Controller"
assemblyfilters:-*Service;-*Controller // Exclude any assembly which is post-fixed by the term "Service" or "Controller"

Class filters: Optional list of classes that should be included or excluded in the report.

classfilters:+*Service;+*Controller // Include any class which is post-fixed by the term "Service" or "Controller"
classfilters:-*Service;-*Controller // Exclude any class which is post-fixed by the term "Service" or "Controller"

File filters: Optional list of files that should be included or excluded in the report:

filefilters:+*Service;+*Controller // Include any file which is post-fixed by the term "Service" or "Controller"
filefilters:-*Service;-*Controller // Exclude any file which is post-fixed by the term "Service" or "Controller"

Additional Context

Exclusion filters take precedence over inclusion filters.
Wildcards are allowed.

Linked To

List any issues linked to this feature request.

Add ability to change badge + health indicator thresholds

Feature Request

Add an optional parameter that allows changing the coverage thresholds for the different colours of badge & health indicator.

Expected Behaviour

  • Parameter will take 1 or 2 values separated by a space.
  • If only 1 value is present it specifies the new lower threshold below which the badge is red, default 50%.
  • If 2 values are present the first specifies the new lower and the second is the new upper threshold above which the badge is green, default 75%.

Additional Context

Linked To

#14 Add a health indicator for each package
#16 Add ability to fail a workflow

Coverage percentage is wrong

Bug Report

I think an image summarizes the problem well enough:

image

I'm not sure how 0.8587... was rounded to 0.87, it should be 0.86
Then it gets really confusing, because the value is displayed as 87%, which is the threshold value, but it claims that the line coverage is below the threshold (which is technically true, but not if you consider the value that is displayed)

Workflow File

      - name: Code Coverage Summary Report
        uses: irongut/[email protected]
        with:
          filename: [REDACTED]/coverage.cobertura.xml
          badge: true
          fail_below_min: true
          format: markdown
          hide_branch_rate: false
          hide_complexity: true
          indicators: true
          output: both
          thresholds: '87 77'

Actions Log

Run irongut/[email protected]
  with:
    filename: [REDACTED]/coverage.cobertura.xml
    badge: true
    fail_below_min: true
    format: markdown
    hide_branch_rate: false
    hide_complexity: true
    indicators: true
    output: both
    thresholds: 87 77
  env:
    DOTNET_ROOT: /home/runner/.dotnet
/usr/bin/docker run --name ghcrioirongutcodecoveragesummaryv130_454770 --label 94859b --workdir /github/workspace --rm -e DOTNET_ROOT -e INPUT_FILENAME -e INPUT_BADGE -e INPUT_FAIL_BELOW_MIN -e INPUT_FORMAT -e INPUT_HIDE_BRANCH_RATE -e INPUT_HIDE_COMPLEXITY -e INPUT_INDICATORS -e INPUT_OUTPUT -e INPUT_THRESHOLDS -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_RUN_ATTEMPT -e GITHUB_ACTOR -e GITHUB_TRIGGERING_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_REF_NAME -e GITHUB_REF_PROTECTED -e GITHUB_REF_TYPE -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e GITHUB_STEP_SUMMARY -e RUNNER_OS -e RUNNER_ARCH -e RUNNER_NAME -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e ACTIONS_ID_TOKEN_REQUEST_URL -e ACTIONS_ID_TOKEN_REQUEST_TOKEN -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/[REDACTED]":"/github/workspace" ghcr.io/irongut/codecoveragesummary:v1.3.0  "--files" "[REDACTED]/coverage.cobertura.xml,[REDACTED]/coverage.cobertura.xml" "--badge" "true" "--fail" "true" "--format" "markdown" "--hidebranch" "false" "--hidecomplexity" "true" "--indicators" "true" "--output" "both" "--thresholds" "87 77"
Coverage File: /github/workspace/[REDACTED]/coverage.cobertura.xml
Coverage File: /github/workspace/[REDACTED]/coverage.cobertura.xml

![Code Coverage](https://img.shields.io/badge/Code%[2](https://github.com/[REDACTED]?check_suite_focus=true#step:11:2)0Coverage-87%25-critical?style=flat)

Package | Line Rate | Branch Rate | Health
-------- | --------- | ----------- | ------
[REDACTED] | 89% | 67% | โž–
[REDACTED] | 84% | 70% | โŒ
**Summary** | **87%** (1021 / 1189) | **68%** (17[3](https://github.com/[REDACTED]?check_suite_focus=true#step:11:3) / 2[5](https://github.com/[REDACTED]?check_suite_focus=true#step:11:5)0) | โŒ

_Minimum allowed line rate is `8[7](https://github.com/[REDACTED]?check_suite_focus=true#step:11:7)%`_

FAIL: Overall line rate below minimum threshold of [8](https://github.com/[REDACTED]?check_suite_focus=true#step:11:8)7%.

Expected Behavior

The line coverage should be reported at 86%, not 87%

Additional Context

N/A

Linked To

N/A

Workflow unable to pull Docker image to run action

Bug Report

Most of the times that my actions run, I get the error in the log below and then the rest of the workflow fails.

edit: sometimes it works, so maybe this is an issue with some runners?

Workflow File

    - name: Code Coverage Summary Report
      uses: irongut/[email protected]
      with:
        filename: coverage/coverage.cobertura.xml
        badge: true
        format: 'markdown'
        output: 'both'

Actions Log

Pull down action image 'ghcr.io/irongut/codecoveragesummary:v1.0.2'
  /usr/bin/docker pull ghcr.io/irongut/codecoveragesummary:v1.0.2
  Error response from daemon: received unexpected HTTP status: 503 Service Unavailable
  Warning: Docker pull failed with exit code 1, back off 6.596 seconds before retry.
  /usr/bin/docker pull ghcr.io/irongut/codecoveragesummary:v1.0.2
  Error response from daemon: received unexpected HTTP status: 503 Service Unavailable
  Warning: Docker pull failed with exit code 1, back off 8.36 seconds before retry.
  /usr/bin/docker pull ghcr.io/irongut/codecoveragesummary:v1.0.2
  Error response from daemon: Head "ghcr.io/v2/irongut/codecoveragesummary/manifests/v1.0.2": received unexpected HTTP status: 503 Service Unavailable
Error: Docker pull failed with exit code 1

Expected Behavior

Actions is able to pull the Docker image for this action and run my entire workflow.

Additional Context

I first noticed it today. It was fine on Friday.

Linked To

Add a health indicator for each package

Feature Request

Add a new column containing an indicator of the "health" of the individual packages using a similar scheme to the badge: less than 50%, 50% - 74%, greater than 75%.

Expected Behaviour

  • Use emojis as a health indicator for each package. e.g.: โŒ / โ˜‘ / โœ… or โŒ / โž– / โœ” or ๐Ÿ”ด / ๐ŸŸก / ๐ŸŸข
  • Add a parameter to enable, default true.

Additional Context

Linked To

#15 Add ability to change badge + health indicator thresholds

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.