-
Notifications
You must be signed in to change notification settings - Fork 14
45 lines (38 loc) · 893 Bytes
/
unit.yml
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
name: Linting and Unit tests
on:
push:
branches:
- main
pull_request:
branches:
- main
defaults:
run:
shell: bash
working-directory: governance-policy-addon-controller
jobs:
linting-and-unit-tests:
runs-on: ubuntu-latest
name: Linting and Unit tests
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: governance-policy-addon-controller
fetch-depth: 0 # Fetch all history for all tags and branches
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: governance-policy-addon-controller/go.mod
- name: Verify modules
run: |
go mod verify
- name: Some quality checks
run: |
make fmt
git diff --exit-code
make lint
make gosec-scan
- name: Unit and Integration Tests
run: |
make test