From cf83c8afb5d98eb10dd2b53fdde83d111796d6ef Mon Sep 17 00:00:00 2001 From: Valentin Kiselev Date: Wed, 15 Mar 2023 16:22:20 +0300 Subject: [PATCH] feat: add compare_ref and compare_sha options --- README.md | 2 ++ action.yml | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/README.md b/README.md index 5533defd..a2db74d2 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,8 @@ The action's step needs to run after your test suite has outputted an LCOV file. | `base-path` | _optional_ | Path to the root folder of the project the coverage was collected in. Should be used in monorepos so that coveralls can process the LCOV correctly (e.g. packages/my-project) | | `git-branch` | _optional_ | Default: GITHUB_REF environment variable. Override the branch name. | | `git-commit` | _optional_ | Default: GITHUB_SHA environment variable. Override the commit SHA. | +| `compare-ref` | _optional_ | Branch name to compare coverage with. Specify if you want to always check coverage change for PRs against one branch. | +| `compare-sha` | _optional_ | Commit SHA to compare coverage with. | ### Outputs: diff --git a/action.yml b/action.yml index 80ba7c14..a04a3c54 100644 --- a/action.yml +++ b/action.yml @@ -38,6 +38,12 @@ inputs: git-commit: description: 'Override the commit sha' required: false + compare-ref: + description: 'Branch name to use as the base for coverage results' + required: false + compare-sha: + description: 'Commit SHA to use as the base for coverage results' + required: false debug: description: 'Enable debug output' required: false @@ -102,3 +108,5 @@ runs: COVERALLS_GIT_BRANCH: ${{ inputs.git-branch }} COVERALLS_GIT_COMMIT: ${{ inputs.git-commit }} COVERALLS_REPO_TOKEN: ${{ inputs.github-token }} + COVERALLS_COMPARE_REF: ${{ inputs.compare-ref }} + COVERALLS_COMPARE_SHA: ${{ inputs.compare-sha }}