Branch coverage reports #97
Workflow file for this run
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
name: Validation | |
on: [push, pull_request] | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
basic: | |
name: generate and vet | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: './go.mod' | |
- run: | | |
make generate | |
make manifests | |
go mod tidy | |
make fmt | |
make vet | |
git diff --exit-code | |
unit-tests: | |
name: Unit Tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: './go.mod' | |
- run: | | |
make test | |
# Fix things up for the coverage report | |
head -1 cover.out > nucleus_cover.out | |
grep 'governance-policy-nucleus' cover.out >> nucleus_cover.out | |
sudo rm -rf .go | |
- name: Update coverage report | |
uses: ncruces/go-coverage-report@v0 | |
with: | |
coverage-file: nucleus_cover.out | |
output-dir: ${{ github.ref_name }} | |
report: true | |
chart: false | |
amend: false | |
if: ${{ github.event_name == 'push' }} | |
continue-on-error: true |