-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
8 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<p align="center"> | ||
<img src="./doc/gopher.png" alt="limgo gopher" /> | ||
<h2 align="center">Limgo</h3> | ||
<p align="center">Don't let your test coverage drop</p> | ||
<p align="center"> | ||
|
@@ -12,19 +13,11 @@ | |
|
||
A tool for defining and enforcing test coverage thresholds locally as well as in CI pipelines - similar to the coverage thresholds in JavaScripts popular Testing Framework [Jest](https://jestjs.io/docs/configuration#coveragethreshold-object). | ||
|
||
`limgo` builds on top of the code coverage file generated by `go test` and extends it by a configuration file to define thresholds on directories and files using regular expressions. If those thresholds are not met, `limgo` will exit with code 1 and displays the coverage statistic for the module as well as a message which files do not meet any thresholds. | ||
``` | ||
Files % Stmt % Line % Branch Uncovered Lines | ||
github.com/GoTestTools/limgo 29.18 24.59 33.33 | ||
pkg/model/coverage 69.77 70.91 60.00 | ||
groupedCoverage.go 0.00 0.00 0.00 [10 11 12 13 15 16 17 18 19 20] | ||
line.go 82.76 85.29 100.00 [55 63 71 79 87] | ||
lineMatcher.go 85.71 90.91 50.00 [26] | ||
... | ||
Expected coverage thresholds not met: | ||
'pkg/model/coverage/line.go': expected coverage threshold for statements of 100.00%, but only got 82.76% | ||
``` | ||
`limgo` builds on top of the code coverage file generated by `go test` and extends it by providing | ||
- a configuration to define test coverage thresholds to enforce | ||
- and a detailed view of the statement/line/branch coverage - from a module level down to every function | ||
|
||
<img src="./doc/example.png" alt="limgo gopher" /> | ||
|
||
## Installation | ||
|
||
|
@@ -140,9 +133,9 @@ jobs: | |
# Option 2: | ||
# install via GitHub Action | ||
- name: Set up limgo - option 2 | ||
uses: GoTestTools/[email protected].0 | ||
uses: GoTestTools/[email protected].1 | ||
with: | ||
version: "v0.0.1-beta" | ||
version: "v0.0.2-beta" | ||
install-only: true | ||
|
||
# Run tests with coverprofile | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.