-
Notifications
You must be signed in to change notification settings - Fork 5
36 lines (35 loc) · 972 Bytes
/
ci.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
---
name: CI
on:
pull_request:
branches:
- v1
jobs:
project:
name: Project Checks
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v4
with:
go-version: v1.22
- name: Linting and formatting
run: |
go mod tidy
go mod verify
make fmt
make vet
git diff --exit-code
- name: Install Prerequisites
run: |
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash
GOBIN=${HOME}/.config/kustomize/plugin/policy.open-cluster-management.io/v1/policygenerator \
go install open-cluster-management.io/policy-generator-plugin/cmd/PolicyGenerator@latest
- name: Build
run: make build
- name: Run unit tests
run: make test