From 3b9ace7ffc97ed7df07b9a058ef6c565274da09c Mon Sep 17 00:00:00 2001 From: Francesco Romani Date: Fri, 17 Feb 2023 11:00:40 +0100 Subject: [PATCH 1/2] makefile: bootstrap bootstrap the makefile adding basic targets to run vet and run the unit test suite, both to be used in CI. Signed-off-by: Francesco Romani --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d331035 --- /dev/null +++ b/Makefile @@ -0,0 +1,7 @@ +.PHONY: unit-tests +unit-tests: + @go test ./pkg/apis/... + +.PHONY: vet +vet: + @go vet ./pkg/... From a4c4677bb048fde5780ac589e738995a645ba14d Mon Sep 17 00:00:00 2001 From: Francesco Romani Date: Fri, 17 Feb 2023 16:40:19 +0100 Subject: [PATCH 2/2] ghactions: setup basic CI bootstrap the basic CI with go vet and unit tests unit tests proper to be added in future PRs. Signed-off-by: Francesco Romani --- .github/workflows/ci-base.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/ci-base.yml diff --git a/.github/workflows/ci-base.yml b/.github/workflows/ci-base.yml new file mode 100644 index 0000000..be5bdf1 --- /dev/null +++ b/.github/workflows/ci-base.yml @@ -0,0 +1,27 @@ +name: CI - base + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + + code-checks: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set up golang + uses: actions/setup-go@v2 + with: + go-version: 1.19 + + - name: Vet + run: make vet + + - name: Run unit tests + run: make unit-tests