Skip to content

Commit

Permalink
feat: add compare-ref and compare-sha options (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrexox committed Mar 15, 2023
1 parent 28fd5c0 commit 394fd90
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -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:

Expand Down
8 changes: 8 additions & 0 deletions action.yml
Expand Up @@ -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
Expand Down Expand Up @@ -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 }}

0 comments on commit 394fd90

Please sign in to comment.