From cabce568808ed7507751f45b73c6bfdda3b7e7c3 Mon Sep 17 00:00:00 2001 From: Justin Kulikauskas <44813129+JustinKuli@users.noreply.github.com> Date: Sat, 4 May 2024 19:39:00 +0000 Subject: [PATCH] Add badges and a worflow for coverage See https://github.com/marketplace/actions/go-coverage-report Signed-off-by: Justin Kulikauskas <44813129+JustinKuli@users.noreply.github.com> --- .github/workflows/validate.yaml | 10 ++++++++++ README.md | 6 ++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/validate.yaml b/.github/workflows/validate.yaml index 96ce269..b943f79 100644 --- a/.github/workflows/validate.yaml +++ b/.github/workflows/validate.yaml @@ -37,3 +37,13 @@ jobs: - run: | make test + + - name: Update coverage report + uses: ncruces/go-coverage-report@v0 + with: + coverage-file: cover.out + report: true + chart: false + amend: false + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} + continue-on-error: true diff --git a/README.md b/README.md index 2ed1684..5d80b54 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,13 @@ [comment]: # " Copyright Contributors to the Open Cluster Management project " +[![License](https://img.shields.io/:license-apache-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html) +[![Go Report Card](https://goreportcard.com/badge/github.com/JustinKuli/governance-policy-nucleus)](https://goreportcard.com/report/github.com/JustinKuli/governance-policy-nucleus) +[![Go Reference](https://pkg.go.dev/badge/image)](https://pkg.go.dev/github.com/JustinKuli/governance-policy-nucleus) +[![Go Coverage](https://github.com/JustinKuli/governance-policy-nucleus/wiki/coverage.svg)](https://raw.githack.com/wiki/JustinKuli/governance-policy-nucleus/coverage.html) # Governance Policy Nucleus Open Cluster Management - Governance Policy Nucleus -[![License](https://img.shields.io/:license-apache-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html) - ## Description The Policy Nucleus maintains common API validation, structs, and methods for policy controllers.