2021-09-26 11:39:35 +02:00
|
|
|
name: Coverage Comment
|
2021-09-26 00:13:50 +02:00
|
|
|
description: >
|
|
|
|
|
Publish diff coverage report as PR comment, and create a coverage badge
|
|
|
|
|
to display on the readme.
|
2021-07-15 21:08:53 +02:00
|
|
|
inputs:
|
2021-09-25 11:54:56 +02:00
|
|
|
GITHUB_TOKEN:
|
2021-09-26 11:39:35 +02:00
|
|
|
description: >
|
|
|
|
|
A GitHub token to write comments and write the badge to the wiki
|
|
|
|
|
(``${{ github.token }}``)
|
2021-07-15 21:08:53 +02:00
|
|
|
required: true
|
2021-09-25 11:54:56 +02:00
|
|
|
COVERAGE_FILE:
|
2021-09-26 11:39:35 +02:00
|
|
|
description: >
|
|
|
|
|
Path and filename of the coverage XML file to analyze.
|
2021-09-25 11:54:56 +02:00
|
|
|
default: "coverage.xml"
|
|
|
|
|
required: false
|
|
|
|
|
COMMENT_TEMPLATE:
|
|
|
|
|
description: >
|
2021-09-26 11:39:35 +02:00
|
|
|
[Advanced] Specify a different template for the comments that will be written on the PR.
|
2021-09-25 11:54:56 +02:00
|
|
|
required: false
|
|
|
|
|
DIFF_COVER_ARGS:
|
2021-09-26 11:39:35 +02:00
|
|
|
description: >
|
|
|
|
|
[Advanced] Additional args to pass to diff cover (one per line)
|
2021-09-25 11:54:56 +02:00
|
|
|
required: false
|
|
|
|
|
BADGE_ENABLED:
|
2021-09-26 11:39:35 +02:00
|
|
|
description: >
|
|
|
|
|
Whether or not a badge will be generated and stored.
|
2021-09-25 11:54:56 +02:00
|
|
|
default: "true"
|
|
|
|
|
required: false
|
2021-09-26 00:13:50 +02:00
|
|
|
BADGE_FILENAME:
|
2021-09-26 11:39:35 +02:00
|
|
|
description: >
|
|
|
|
|
Name of the json file containing badge informations stored in the repo
|
|
|
|
|
wiki.
|
2021-09-26 00:13:50 +02:00
|
|
|
default: coverage-comment-badge.json
|
|
|
|
|
required: false
|
|
|
|
|
MINIMUM_GREEN:
|
2021-09-26 11:39:35 +02:00
|
|
|
description: >
|
|
|
|
|
If the coverage percentage is above or equal to this value, the badge
|
|
|
|
|
will be green.
|
2021-09-26 00:13:50 +02:00
|
|
|
default: 100
|
|
|
|
|
required: false
|
|
|
|
|
MINIMUM_ORANGE:
|
2021-09-26 11:39:35 +02:00
|
|
|
description: >
|
|
|
|
|
If the coverage percentage is not green and above or equal to this value,
|
|
|
|
|
the badge will be orange. Otherwise it will be red.
|
2021-09-26 00:13:50 +02:00
|
|
|
default: 70
|
|
|
|
|
required: false
|
2021-07-15 21:08:53 +02:00
|
|
|
runs:
|
2021-09-26 11:39:35 +02:00
|
|
|
using: docker
|
2021-09-26 11:44:27 +02:00
|
|
|
# image: Dockerfile
|
|
|
|
|
image: docker://ewjoachim/coverage-comment-action:v1
|
2021-09-25 11:54:56 +02:00
|
|
|
env:
|
|
|
|
|
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
|
|
|
|
|
COVERAGE_FILE: ${{ inputs.COVERAGE_FILE }}
|
|
|
|
|
COMMENT_TEMPLATE: ${{ inputs.COMMENT_TEMPLATE }}
|
|
|
|
|
DIFF_COVER_ARGS: ${{ inputs.DIFF_COVER_ARGS }}
|
|
|
|
|
BADGE_ENABLED: ${{ inputs.BADGE_ENABLED }}
|
2021-09-26 00:13:50 +02:00
|
|
|
BADGE_FILENAME: ${{ inputs.BADGE_FILENAME }}
|
|
|
|
|
MINIMUM_GREEN: ${{ inputs.MINIMUM_GREEN }}
|
|
|
|
|
MINIMUM_ORANGE: ${{ inputs.MINIMUM_ORANGE }}
|