From 27f70f9742e4b498002b21c78b4c26a0f4f32ea9 Mon Sep 17 00:00:00 2001 From: Thomas Polkowski Date: Fri, 10 Jan 2025 11:04:58 -0500 Subject: [PATCH] Add code coverage badge for blueprint-cli BOP-1677 (#106) --- .github/workflows/unit.yml | 10 ++++++++++ README.md | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index 236ced46..3328599c 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -33,6 +33,16 @@ jobs: working-directory: . run: make test + - name: Update coverage badge + uses: ncruces/go-coverage-report@v0 + if: github.ref == 'refs/heads/main' + with: + report: false + chart: false + amend: true + badge-style: flat + coverage-file: coverage.txt + - name: Archive code coverage results uses: actions/upload-artifact@v4 id: artifact_upload diff --git a/README.md b/README.md index f1c6ec1b..efcf35c6 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Blueprint Controller +# Blueprint Controller [![cov](https://github.com/Mirantis/blueprint-cli/wiki/coverage.svg)](https://github.com/Mirantis/blueprint-cli/wiki/coverage.svg) ## The Repository This is the repository for the Blueprint Controller. The Blueprint Controller is a CLI tool that allows you to manage your Blueprint clusters. This repo contains the actual source code for compiling the Blueprint Controller (`bctl`) binary. This source code is available to everyone under the [Apache License 2.0](./LICENSE).