File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717 - name : Build
1818 run : go build -v ./...
1919 - name : Test with the Go CLI
20- run : go test
20+ run : |
21+ go test -v ./... -covermode=count -coverprofile=coverage.out
22+ go tool cover -func=coverage.out -o=coverage.out
23+ - name : Go Coverage Badge # Pass the `coverage.out` output to this action
24+ uses : tj-actions/coverage-badge-go@v2
25+ with :
26+ filename : coverage.out
27+ - name : Verify Changed files
28+ uses : tj-actions/verify-changed-files@v16
29+ id : verify-changed-files
30+ with :
31+ files : README.md
32+ - name : Commit changes
33+ if : steps.verify-changed-files.outputs.files_changed == 'true'
34+ run : |
35+ git config --local user.email "action@github.com"
36+ git config --local user.name "GitHub Action"
37+ git add README.md
38+ git commit -m "chore: Updated coverage badge."
39+ - name : Push changes
40+ if : steps.verify-changed-files.outputs.files_changed == 'true'
41+ uses : ad-m/github-push-action@master
42+ with :
43+ github_token : ${{ github.token }}
44+ branch : ${{ github.head_ref }}
2145
Original file line number Diff line number Diff line change 11# RingChan
22
33[ ![ CI] ( https://github.com/floatdrop/ringchan/actions/workflows/ci.yaml/badge.svg )] ( https://github.com/floatdrop/ringchan/actions/workflows/ci.yaml )
4+ ![ Coverage] ( https://img.shields.io/badge/Coverage-100.0-brightgreen )
45[ ![ Go Report Card] ( https://goreportcard.com/badge/github.com/floatdrop/ringchan )] ( https://goreportcard.com/report/github.com/floatdrop/ringchan )
56[ ![ Go Reference] ( https://pkg.go.dev/badge/github.com/floatdrop/ringchan.svg )] ( https://pkg.go.dev/github.com/floatdrop/ringchan )
67[ ![ License: MIT] ( https://img.shields.io/badge/License-MIT-yellow.svg )] ( https://opensource.org/licenses/MIT )
You can’t perform that action at this time.
0 commit comments