Skip to content

Commit

Permalink
fix(UX-1139): Prevent commiting coverage file; store previous coverag…
Browse files Browse the repository at this point in the history
…e result as artifact (#25)

feat: Add `run-prev-coverage` flag
chore: Add debug logs
Release-as: 1.0.6
  • Loading branch information
thelukewalton authored Jul 22, 2024
1 parent 6179244 commit b4d7937
Show file tree
Hide file tree
Showing 16 changed files with 128,698 additions and 26,989 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,23 @@ jobs:
| run-tests | Whether tests should be run. | false | true |
| run-analysis | Whether static analysis should be run. | false | true |
| run-coverage | Whether code coverage should be run. | false | true |
| run-prev-coverage | Whether code coverage should be compared with the base branch. | false | true |
| run-behind-by | Whether action should check if HEAD branch is behind base branch. | false | true |
| create-comment | Whether the action should comment the output status. | false | true |
| working-directory | Working directory to run the action in | false | "." |
## Coverage
⚠️ To compare coverage against previous code, it is required that the code is checked out with `fetch-depth: 0`:

```yaml
- uses: actions/checkout@v4
with:
fetch-depth: 0
```

> During the action, coverage will be calculated, and lcov.info will be saved in temporary directory `.coverage`. Please refrain from using a top level directory with this path, as this could cause issues.

## Contributing

This project welcomes contributions. Please check out our [Contributing guide](CONTRIBUTING.md) to learn more on how to get started.
Expand Down
6 changes: 6 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ inputs:
default: true
type: boolean

run-prev-coverage:
description: "Run test coverage check on base branch"
required: false
default: true
type: boolean

run-behind-by:
description: "Run behind by check"
required: false
Expand Down
153,724 changes: 126,902 additions & 26,822 deletions dist/index.js

Large diffs are not rendered by default.

Loading

0 comments on commit b4d7937

Please sign in to comment.