Skip to content

Commit 6b987f2

Browse files
authored
Add example uses section to README
1 parent 9bb93d5 commit 6b987f2

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,23 @@ jobs:
4444
env:
4545
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4646
```
47+
48+
## Example uses
49+
50+
### mypy
51+
52+
Parse the mypy imprecision text report (lower number is better).
53+
54+
```console
55+
$ mypy src --ignore-missing-imports --no-incremental --txt-report ./.reports/mypy
56+
$ commitstat .reports/mypy/index.txt --regex "\| Total\s*\|\s*([\d\.]+%)" --goal decrease --name mypy
57+
```
58+
59+
### pytest with pytest-cov
60+
61+
Parse the pytest-cov default HTML report for the total coverage percentage.
62+
63+
```console
64+
$ pytest --cov=src --cov-report=html:.reports/src/pytest src
65+
$ commitstat .reports/pytest/index.html --regex "<span class=\"pc_cov\">(\d+%)<\/span>" --goal increase --name pytest
66+
```

0 commit comments

Comments
 (0)