Skip to content

Commit

Permalink
updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
engelmi committed Oct 31, 2022
1 parent b500e58 commit b15d1f6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 deletions.
23 changes: 8 additions & 15 deletions README.md
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">
Expand All @@ -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

Expand Down Expand Up @@ -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
Expand Down
Binary file added doc/example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/gopher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b15d1f6

Please sign in to comment.