File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -59,20 +59,29 @@ jobs:
59
59
60
60
## Example uses
61
61
62
- ### [ mypy](http://mypy-lang.org/)
62
+ ### mypy
63
63
64
- Parse the mypy imprecision text report (lower number is better).
64
+ Parse the [ mypy](https://mypy.readthedocs.io/en/stable/command_line.html#report-generation) imprecision text report (lower number is better).
65
65
66
66
` ` ` console
67
67
$ mypy src --ignore-missing-imports --no-incremental --txt-report ./.reports/mypy
68
68
$ commitstat .reports/mypy/index.txt --regex "\| Total\s*\|\s*([\d\.]+%)" --goal decrease --name mypy
69
69
```
70
70
71
- ### [ pytest] ( https://docs.pytest.org/en/latest/ ) with [ pytest -cov] ( https://github.com/pytest-dev/pytest-cov )
71
+ ### pytest-cov
72
72
73
- Parse the pytest-cov default HTML report for the total coverage percentage.
73
+ Parse the [ pytest-cov] ( https://github.com/pytest-dev/pytest-cov ) default HTML report for the total coverage percentage.
74
74
75
75
``` console
76
76
$ pytest --cov=src --cov-report=html:.reports/src/pytest src
77
77
$ commitstat .reports/pytest/index.html --regex " <span class=\" pc_cov\" >(\d+%)<\/span>" --goal increase --name pytest
78
78
```
79
+
80
+ ### Go test coverage
81
+
82
+ Parse total test coverage from the [ built-in go coverage tool] ( https://blog.golang.org/cover ) .
83
+
84
+ ``` console
85
+ $ go test ./... -coverprofile=coverage.out
86
+ $ go tool cover -func coverage.out | commitstat - --regex " total:\s+\(statements\)\s+([\d\.]+%)" --name coverage
87
+ ```
You can’t perform that action at this time.
0 commit comments