diff --git a/Makefile b/Makefile index 9ccf71d7..b193ef0a 100644 --- a/Makefile +++ b/Makefile @@ -8,15 +8,31 @@ BIN_DIR?=. export GOOS?=$(shell go env GOOS) export GOARCH?=$(shell go env GOARCH) +.PHONY: all +all: audit test build + +.PHONY: audit +audit: + nancy go.sum + +.PHONY: build build: @mkdir -p $(BUILD_ARCH)/$(BIN_DIR) go build -o $(BUILD_ARCH)/$(BIN_DIR)/$(MAIN) cmd/dp-search-query/main.go + +.PHONY: debug debug: build HUMAN_LOG=1 go run -race cmd/dp-search-query/main.go + +.PHONY: acceptance-publishing acceptance-publishing: build HUMAN_LOG=1 go run cmd/dp-search-query/main.go + +.PHONY: acceptance-web acceptance-web: build HUMAN_LOG=1 go run cmd/dp-search-query/main.go + +.PHONY: test test: go test -v -cover $(shell go list ./... | grep -v /vendor/) diff --git a/ci/audit.yml b/ci/audit.yml new file mode 100644 index 00000000..c97f4414 --- /dev/null +++ b/ci/audit.yml @@ -0,0 +1,15 @@ +--- +platform: linux + +image_resource: + type: docker-image + source: + repository: onsdigital/dp-concourse-tools-nancy + tag: latest + +inputs: + - name: dp-search-query + path: dp-search-query + +run: + path: dp-search-query/ci/scripts/audit.sh \ No newline at end of file diff --git a/ci/scripts/audit.sh b/ci/scripts/audit.sh new file mode 100755 index 00000000..854c644c --- /dev/null +++ b/ci/scripts/audit.sh @@ -0,0 +1,7 @@ +#!/bin/bash -eux + +export cwd=$(pwd) + +pushd $cwd/dp-search-query + make audit +popd \ No newline at end of file