ci: specify version number for build dependencies, call build-deps before test

This commit is contained in:
Caleb Doxsey 2020-04-17 08:32:32 -06:00 committed by Caleb Doxsey
parent 7aa97dee68
commit f979bae194
2 changed files with 6 additions and 2 deletions

View file

@ -33,6 +33,8 @@ jobs:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Build dependencies
run: make build-deps
- name: Test
run: make test

View file

@ -27,7 +27,9 @@ CTIMEVAR=-X $(PKG)/internal/version.GitCommit=$(GITCOMMIT) \
-X $(PKG)/internal/version.ProjectURL=$(PKG)
GO_LDFLAGS=-ldflags "-s -w $(CTIMEVAR)"
GOOSARCHES = linux/amd64 darwin/amd64 windows/amd64
MISSPELL_VERSION = v0.3.4
GOLANGCI_VERSION = v1.21.0
OPA_VERSION = v0.19.1
.PHONY: all
all: clean build-deps test lint spellcheck build ## Runs a clean, build, fmt, lint, test, and vet.
@ -36,9 +38,9 @@ all: clean build-deps test lint spellcheck build ## Runs a clean, build, fmt, li
.PHONY: build-deps
build-deps: ## Install build dependencies
@echo "==> $@"
@cd /tmp; GO111MODULE=on go get -u github.com/client9/misspell/cmd/misspell
@cd /tmp; GO111MODULE=on go get github.com/client9/misspell/cmd/misspell@${MISSPELL_VERSION}
@cd /tmp; GO111MODULE=on go get github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_VERSION}
@cd /tmp; GO111MODULE=on go get -u github.com/open-policy-agent/opa
@cd /tmp; GO111MODULE=on go get github.com/open-policy-agent/opa@${OPA_VERSION}
.PHONY: docs
docs: ## Start the vuepress docs development server