Test other modules on all platforms

This commit is contained in:
Katrina Verey
2022-04-04 19:39:01 -04:00
parent ea193328e3
commit df80b29694
3 changed files with 12 additions and 45 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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