From df80b296949bda3da3e51dd069a73252905c1f79 Mon Sep 17 00:00:00 2001 From: Katrina Verey Date: Mon, 4 Apr 2022 19:39:01 -0400 Subject: [PATCH] Test other modules on all platforms --- .github/workflows/go.yml | 48 ++++++++-------------------------------- Makefile | 2 +- cmd/pluginator/Makefile | 7 ++---- 3 files changed, 12 insertions(+), 45 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 41d5a771e..8e038ec01 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -44,24 +44,11 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v2 - - name: Test kyaml - run: go test -cover ./... - working-directory: ./kyaml - - - name: Test api - run: go test -cover ./... -ldflags "-X sigs.k8s.io/kustomize/api/provenance.version=v444.333.222" - working-directory: ./api - - - name: Test cmd/config - run: go test -cover ./... - working-directory: ./cmd/config + - name: Test all modules + run: make test-unit-non-plugin env: KUSTOMIZE_DOCKER_E2E: true - - name: Test kustomize - run: go test -cover ./... - working-directory: ./kustomize - test-macos: name: Test MacOS runs-on: [macos-latest] @@ -76,24 +63,11 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v2 - - name: Test kyaml - run: go test -cover ./... - working-directory: ./kyaml - - - name: Test api - run: go test -cover ./... -ldflags "-X sigs.k8s.io/kustomize/api/provenance.version=v444.333.222" - working-directory: ./api - - - name: Test cmd/config - run: go test -cover ./... - working-directory: ./cmd/config + - name: Test all modules + run: make test-unit-non-plugin env: KUSTOMIZE_DOCKER_E2E: false # docker not installed on mac - - name: Test kustomize - run: go test -cover ./... - working-directory: ./kustomize - test-windows: name: Test Windows runs-on: [windows-latest] @@ -112,18 +86,14 @@ jobs: run: go test -cover ./... working-directory: ./kyaml - # TODO: uncomment once Windows tests are passing. - # - name: Test api - # run: go test -cover ./... -ldflags "-X sigs.k8s.io/kustomize/api/provenance.version=v444.333.222" - # working-directory: ./api - - name: Test cmd/config run: go test -cover ./... working-directory: ./cmd/config env: KUSTOMIZE_DOCKER_E2E: false # docker on windows not working well yet - # TODO: uncomment once Windows tests are passing. - # - name: Test kustomize - # run: go test -cover ./... - # working-directory: ./kustomize + # TODO: replace specific modules above with this once Windows tests are passing. + #- name: Test all modules + # run: make test-unit-non-plugin + # env: + # KUSTOMIZE_DOCKER_E2E: false # docker on windows not working well yet diff --git a/Makefile b/Makefile index a1756033e..fb311c710 100644 --- a/Makefile +++ b/Makefile @@ -122,7 +122,7 @@ lint: $(MYGOBIN)/golangci-lint $(MYGOBIN)/goimports $(builtinplugins) ./hack/for-each-module.sh "make lint" .PHONY: lint-kustomize -lint-kustomize: $(MYGOBIN)/golangci-lint-kustomize $(builtinplugins) +lint-kustomize: $(MYGOBIN)/golangci-lint $(builtinplugins) cd api; $(MAKE) lint cd kustomize; $(MAKE) lint cd cmd/pluginator; $(MAKE) lint diff --git a/cmd/pluginator/Makefile b/cmd/pluginator/Makefile index ee843ebf3..2d0858a7e 100644 --- a/cmd/pluginator/Makefile +++ b/cmd/pluginator/Makefile @@ -7,16 +7,13 @@ include ../../Makefile-modules.mk all: test build -statik: - go get github.com/rakyll/statik - test: generate go test ./... -generate: statik +generate: $(MYGOBIN)/statik ( \ cd internal/krmfunction; \ - statik -src=$(FUNC_WRAPPER_SRC_DIR) -f -p $(FUNC_WRAPPER_DST_DIR) -include=main.go,go.mod.src \ + $(MYGOBIN)/statik -src=$(FUNC_WRAPPER_SRC_DIR) -f -p $(FUNC_WRAPPER_DST_DIR) -include=main.go,go.mod.src \ ) build: generate