Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add compare-ref and compare-sha options #157

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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 }}