forked from bold-commerce/go-shopify
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
testing procedure cleanup and docs (bold-commerce#98)
- Loading branch information
1 parent
6272228
commit c833331
Showing
6 changed files
with
102 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,5 @@ | ||
FROM golang:1.9 | ||
FROM golang:1.14-alpine | ||
|
||
# This is similar to the golang-onbuild image but with different paths and | ||
# test-dependencies loaded as well. | ||
ENV CGO_ENABLED=0 | ||
RUN mkdir -p /go/src/github.com/bold-commerce/go-shopify | ||
WORKDIR /go/src/github.com/bold-commerce/go-shopify | ||
|
||
COPY . /go/src/github.com/bold-commerce/go-shopify | ||
RUN go get -v -d -t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
container: | ||
@docker-compose build test | ||
travis: | ||
@go get -v -d -t | ||
test: | ||
@docker-compose run --rm test | ||
coverage: | ||
@docker-compose run --rm test sh -c 'go test -coverprofile=coverage.out ./... && go tool cover -html coverage.out -o coverage.html' | ||
@open coverage.html | ||
clean: | ||
@docker image rm go-shopify | ||
@rm -f coverage.html coverage.out | ||
|
||
.DEFAULT_GOAL := container |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
@echo off | ||
if "%1%"=="" ( | ||
set cmd=container | ||
) else ( | ||
set cmd=%1% | ||
) | ||
if "%cmd%"=="container" ( | ||
docker-compose build test | ||
goto :eof | ||
) | ||
if "%cmd%"=="test" ( | ||
docker-compose run --rm test | ||
goto :eof | ||
) | ||
if "%cmd%"=="coverage" ( | ||
docker-compose run --rm test sh -c "go test -coverprofile=coverage.out ./... && go tool cover -html coverage.out -o coverage.html" | ||
coverage.html | ||
goto :eof | ||
) | ||
if "%cmd%"=="clean" ( | ||
docker image rm go-shopify | ||
del coverage.html | ||
del coverage.out | ||
goto :eof | ||
) |