mirror of
https://github.com/gomods/athens
synced 2026-02-03 12:10:32 +00:00
added environment argument for golang version (#1361)
* added environment argument for golang version
* Revert: added environment argument for golang version (84298506)
* reverted to specifying go version 1.12 as the default
* fix spacing
This commit is contained in:
committed by
Aaron Schlesinger
parent
99477da3cc
commit
5444309405
+4
-1
@@ -1,4 +1,7 @@
|
|||||||
FROM golang:1.12
|
ARG GOLANG_VERSION=1.12
|
||||||
|
FROM golang:$GOLANG_VERSION
|
||||||
|
|
||||||
|
RUN echo $GOLANG_VERSION
|
||||||
|
|
||||||
RUN mkdir -p /athens/tests
|
RUN mkdir -p /athens/tests
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
VERSION = "unset"
|
VERSION = "unset"
|
||||||
DATE=$(shell date -u +%Y-%m-%d-%H:%M:%S-%Z)
|
DATE=$(shell date -u +%Y-%m-%d-%H:%M:%S-%Z)
|
||||||
|
|
||||||
|
ifndef GOLANG_VERSION
|
||||||
|
override GOLANG_VERSION = 1.12
|
||||||
|
endif
|
||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
build: ## build the athens proxy
|
build: ## build the athens proxy
|
||||||
cd cmd/proxy && go build
|
cd cmd/proxy && go build
|
||||||
@@ -47,7 +52,8 @@ test-unit: ## run unit tests with race detector and code coverage enabled
|
|||||||
|
|
||||||
.PHONY: test-unit-docker
|
.PHONY: test-unit-docker
|
||||||
test-unit-docker: ## run unit tests with docker
|
test-unit-docker: ## run unit tests with docker
|
||||||
docker-compose -p athensunit up --exit-code-from=testunit --build testunit
|
docker-compose -p athensunit build --build-arg GOLANG_VERSION=${GOLANG_VERSION} testunit
|
||||||
|
docker-compose -p athensunit up --exit-code-from=testunit testunit
|
||||||
docker-compose -p athensunit down
|
docker-compose -p athensunit down
|
||||||
|
|
||||||
.PHONY: test-e2e
|
.PHONY: test-e2e
|
||||||
@@ -56,7 +62,8 @@ test-e2e:
|
|||||||
|
|
||||||
.PHONY: test-e2e-docker
|
.PHONY: test-e2e-docker
|
||||||
test-e2e-docker:
|
test-e2e-docker:
|
||||||
docker-compose -p athense2e up --build --exit-code-from=teste2e teste2e
|
docker-compose -p athense2e build --build-arg GOLANG_VERSION=${GOLANG_VERSION} teste2e
|
||||||
|
docker-compose -p athense2e up --exit-code-from=teste2e teste2e
|
||||||
docker-compose -p athense2e down
|
docker-compose -p athense2e down
|
||||||
|
|
||||||
.PHONY: docker
|
.PHONY: docker
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile.test
|
dockerfile: Dockerfile.test
|
||||||
|
args:
|
||||||
|
GOLANG_VERSION: 1.12
|
||||||
command: ["./scripts/test_unit.sh"]
|
command: ["./scripts/test_unit.sh"]
|
||||||
environment:
|
environment:
|
||||||
- GO_ENV=test
|
- GO_ENV=test
|
||||||
@@ -31,6 +33,8 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile.test
|
dockerfile: Dockerfile.test
|
||||||
|
args:
|
||||||
|
GOLANG_VERSION: 1.12
|
||||||
command: ["./scripts/test_e2e.sh"]
|
command: ["./scripts/test_e2e.sh"]
|
||||||
azurite:
|
azurite:
|
||||||
image: arafato/azurite:2.6.5
|
image: arafato/azurite:2.6.5
|
||||||
|
|||||||
Reference in New Issue
Block a user