From f9e660f87041a3192b26b41131d8fac59ddb12c6 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Thu, 22 Feb 2024 12:03:47 +0000 Subject: [PATCH] Add minimal Makefile To quickly run linters, unit tests and potentially acceptance tests against a local DevStack. We will eventually add golangci-lint to the 'lint' target but that's a larger piece of work that should be done separately. We should also rework the GitHub Actions jobs to use these targets and remove the scripts, but that requires more work on job skips to be able to do that. Signed-off-by: Stephen Finucane --- Makefile | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000..c0e5cfb243 --- /dev/null +++ b/Makefile @@ -0,0 +1,87 @@ +lint: + go fmt ./... + go vet -tags "fixtures acceptance" ./... +.PHONY: lint + +unit: + go test ./openstack/... +.PHONY: unit + +acceptance: acceptance-baremetal acceptance-blockstorage acceptance-clustering acceptance-compute acceptance-container acceptance-containerinfra acceptance-db acceptance-dns acceptance-identity acceptance-imageservice acceptance-keymanager acceptance-loadbalancer acceptance-messaging acceptance-networking acceptance-objectstorage acceptance-orchestration acceptance-placement acceptance-sharedfilesystems acceptance-workflow +.PHONY: acceptance + +acceptance-baremetal: + go test -tags "fixtures acceptance" ./internal/acceptance/openstack/baremetal/... +.PHONY: acceptance-baremetal + +acceptance-blockstorage: + go test -tags "fixtures acceptance" ./internal/acceptance/openstack/blockstorage/... +.PHONY: acceptance-blockstorage + +acceptance-clustering: + go test -tags "fixtures acceptance" ./internal/acceptance/openstack/clustering/... +.PHONY: acceptance-clustering + +acceptance-compute: + go test -tags "fixtures acceptance" ./internal/acceptance/openstack/compute/... +.PHONY: acceptance-compute + +acceptance-container: + go test -tags "fixtures acceptance" ./internal/acceptance/openstack/container/... +.PHONY: acceptance-container + +acceptance-containerinfra: + go test -tags "fixtures acceptance" ./internal/acceptance/openstack/containerinfra/... +.PHONY: acceptance-containerinfra + +acceptance-db: + go test -tags "fixtures acceptance" ./internal/acceptance/openstack/db/... +.PHONY: acceptance-db + +acceptance-dns: + go test -tags "fixtures acceptance" ./internal/acceptance/openstack/dns/... +.PHONY: acceptance-dns + +acceptance-identity: + go test -tags "fixtures acceptance" ./internal/acceptance/openstack/identity/... +.PHONY: acceptance-identity + +acceptance-image: + go test -tags "fixtures acceptance" ./internal/acceptance/openstack/imageservice/... +.PHONY: acceptance-image + +acceptance-keymanager: + go test -tags "fixtures acceptance" ./internal/acceptance/openstack/keymanager/... +.PHONY: acceptance-keymanager + +acceptance-loadbalancer: + go test -tags "fixtures acceptance" ./internal/acceptance/openstack/loadbalancer/... +.PHONY: acceptance-loadbalancer + +acceptance-messaging: + go test -tags "fixtures acceptance" ./internal/acceptance/openstack/messaging/... +.PHONY: acceptance-messaging + +acceptance-networking: + go test -tags "fixtures acceptance" ./internal/acceptance/openstack/networking/... +.PHONY: acceptance-networking + +acceptance-objectstorage: + go test -tags "fixtures acceptance" ./internal/acceptance/openstack/objectstorage/... +.PHONY: acceptance-objectstorage + +acceptance-orchestration: + go test -tags "fixtures acceptance" ./internal/acceptance/openstack/orchestration/... +.PHONY: acceptance-orchestration + +acceptance-placement: + go test -tags "fixtures acceptance" ./internal/acceptance/openstack/placement/... +.PHONY: acceptance-placement + +acceptance-sharedfilesystems: + go test -tags "fixtures acceptance" ./internal/acceptance/openstack/sharedfilesystems/... +.PHONY: acceptance-sharefilesystems + +acceptance-workflow: + go test -tags "fixtures acceptance" ./internal/acceptance/openstack/workflow/... +.PHONY: acceptance-workflow