-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cicd(docs): coverage goreport and master pipeline badges (#20)
- Loading branch information
Showing
3 changed files
with
27 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters