Skip to content

Commit

Permalink
cicd(docs): coverage goreport and master pipeline badges (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
ndopj authored Oct 3, 2023
1 parent 8e3fefa commit 4242043
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
23 changes: 21 additions & 2 deletions .github/workflows/release.yml → .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,28 @@ jobs:
tests:
if: github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/')
uses: ./.github/workflows/tests.yml
coverage-check:
if: github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Create a coverage file in workspace
run: cat coverage.out > ${{ runner.workspace }}/coverage.out
- name: check test coverage
id: coverage ## this step must have id
uses: vladopajic/go-test-coverage@v2
with:
profile: ${{ runner.workspace }}/coverage.out
local-prefix: github.com/kiwicom/terraform-provider-montecarlo
threshold-file: 0
threshold-package: 0
threshold-total: 0
- name: make coverage badge
uses: action-badges/[email protected]
with:
label: coverage
message: ${{ steps.coverage.outputs.badge-text }}
message-color: ${{ steps.coverage.outputs.badge-color }}
file-name: coverage.svg
badge-branch: badges ## orphan branch where badge will be committed
github-token: "${{ secrets.GITHUB_TOKEN }}"
goreleaser:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
needs: tests
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ jobs:
go tool cover -func=coverage.out -o=coverage.out
env:
TF_ACC: '1'
- name: Create a coverage file in workspace
run: cat coverage.out > ${{ runner.workspace }}/coverage.out
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
[![GitHub issues](https://img.shields.io/github/issues/kiwicom/terraform-provider-montecarlo)](https://github.com/kiwicom/terraform-provider-montecarlo/issues)
![GitHub go.mod Go version)](https://img.shields.io/github/go-mod/go-version/kiwicom/terraform-provider-montecarlo)
[![last-commit](https://img.shields.io/github/last-commit/kiwicom/terraform-provider-montecarlo)]()
![GitHub release](https://img.shields.io/github/v/release/kiwicom/terraform-provider-montecarlo)
![master cicd status](https://github.com/kiwicom/terraform-provider-montecarlo/actions/workflows/master.yml/badge.svg)
![GitHub release](https://img.shields.io/github/v/release/kiwicom/terraform-provider-montecarlo)
[![Go Report Card](https://goreportcard.com/badge/github.com/kiwicom/terraform-provider-montecarlo)](https://goreportcard.com/report/github.com/kiwicom/terraform-provider-montecarlo)
![coverage](https://raw.githubusercontent.com/kiwicom/terraform-provider-montecarlo/badges/.badges/master/coverage.svg)

[![Terraform](https://img.shields.io/badge/terraform-%235835CC.svg?style=for-the-badge&logo=terraform&logoColor=white)](https://registry.terraform.io/providers/kiwicom/montecarlo/latest)

Expand Down

0 comments on commit 4242043

Please sign in to comment.