-
Notifications
You must be signed in to change notification settings - Fork 4
56 lines (46 loc) · 1.26 KB
/
validate.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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
- run: |
head -1 cover.out > nucleus_cover.out
grep 'governance-policy-nucleus' cover.out >> nucleus_cover.out
go tool cover -func=nucleus_cover.out
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
continue-on-error: true
- name: Update coverage report
uses: ncruces/go-coverage-report@v0
with:
coverage-file: nucleus_cover.out
report: true
chart: false
amend: false
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
continue-on-error: true