Skip to content

Commit

Permalink
ci: add github action
Browse files Browse the repository at this point in the history
Also, update controller-gen from v0.13.0 to v0.14.0 to avoid
kubernetes-sigs/controller-tools#880.
  • Loading branch information
basti1302 committed May 15, 2024
1 parent ae61943 commit a3f70cd
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 1 deletion.
56 changes: 56 additions & 0 deletions .github/workflows/verify.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: verify

on:
push:
branches:
- 'main'
tags:
- 'v*'
pull_request:
workflow_dispatch:

jobs:
verify:
runs-on: ubuntu-latest
name: Build & Test

steps:
- uses: actions/checkout@v4
with:
submodules: true

- uses: actions/setup-go@v5
with:
go-version: ~1.22
cache: true

- name: go version
run: |
go version
- name: build
run: |
make
- name: verify that generated code is up-to-date
run: |
# make (which we ran in the previous step) will implicitly also run the targets manifests & generate, which
# could potentially modify code that is under version control, if changes have been comitted that would have
# required updating manifests or generated code and these updates have not been done.
git diff --exit-code
- name: lint
run: |
make lint
- name: test
run: |
make test
- name: build container image
run: |
make docker-build
- name: end-to-end test
run: |
make test-e2e
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest

## Tool Versions
KUSTOMIZE_VERSION ?= v5.2.1
CONTROLLER_TOOLS_VERSION ?= v0.13.0
CONTROLLER_TOOLS_VERSION ?= v0.14.0

.PHONY: kustomize
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary. If wrong version is installed, it will be removed before downloading.
Expand Down

0 comments on commit a3f70cd

Please sign in to comment.