Skip to content

Commit

Permalink
Merge pull request #24 from spekary/build_fix
Browse files Browse the repository at this point in the history
Final CI fixes
  • Loading branch information
spekary authored Feb 10, 2022
2 parents 170d2fc + f6fa00c commit c12ef98
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1,115 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,28 @@ jobs:
run: go install

- name: Test
run:
run: |
go test -v -cover ./... -coverprofile coverage.out -coverpkg ./...
go tool cover -func=coverage.out -o=coverage.out
go tool cover -func coverage.out -o coverage.out
- name: Go Coverage Badge
uses: tj-actions/coverage-badge-go@v1
if: ${{ runner.os == 'Linux' }}
if: ${{ runner.os == 'Linux' && matrix.go == '1.17' }}
with:
green: 80
filename: coverage.out

- name: Verify Changed files
uses: tj-actions/[email protected]
id: verify-changed-files

- uses: stefanzweifel/git-auto-commit-action@v4
id: auto-commit-action
with:
files: README.md
commit_message: Apply Code Coverage Badge
skip_fetch: true
skip_checkout: true
file_pattern: ./README.md

- name: Push changes
if: steps.verify-changed-files.outputs.files_changed == 'true'
if: steps.auto-commit-action.outputs.changes_detected == 'true'
uses: ad-m/github-push-action@master
with:
github_token: ${{ github.token }}
branch: ${{ github.head_ref }}
branch: ${{ github.ref }}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
![Build Status](https://img.shields.io/github/workflow/status/goradd/got/Go)
![Coverage](https://img.shields.io/badge/Coverage-94.4%25-brightgreen)
[![Go Report Card](https://goreportcard.com/badge/github.com/goradd/got)](https://goreportcard.com/report/github.com/goradd/got)
# GoT

Expand Down
Loading

0 comments on commit c12ef98

Please sign in to comment.