forked from eclipse-kanto/aws-connector
-
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.
Inital version of code coverage markdown in wiki
- Loading branch information
1 parent
949f64a
commit 31e7125
Showing
2 changed files
with
49 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Create Coverage | ||
|
||
on: push | ||
permissions: write-all | ||
jobs: | ||
coverage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: '1.21.0' | ||
- name: Setup | ||
run: go get github.com/boumenot/gocover-cobertura | ||
- name: Test | ||
run: go test ./... -coverprofile=coverage.out | ||
- name: Convert | ||
run: gocover-cobertura -by-files < coverage.out > coverage.xml | ||
- name: Code Coverage Report | ||
uses: irongut/[email protected] | ||
with: | ||
filename: coverage.xml | ||
badge: true | ||
fail_below_min: true | ||
format: markdown | ||
hide_branch_rate: false | ||
hide_complexity: false | ||
indicators: true | ||
output: both | ||
thresholds: '60 80' | ||
- name: Checkout wiki code | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: ${{github.repository}}.wiki | ||
path: markdown | ||
- name: Push to wiki | ||
run: | | ||
cp code-coverage-results.md markdown/ | ||
cd markdown | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git add . | ||
git diff-index --quiet HEAD || git commit -m "Add changes" && git push |
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