-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use docker in docker for the existing testsuite
- Loading branch information
Adam Scarr
committed
Aug 8, 2018
1 parent
0eb08ab
commit f372b1c
Showing
7 changed files
with
48 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,16 @@ | ||
version: 2 | ||
jobs: | ||
build: | ||
working_directory: /app | ||
docker: | ||
- image: golang:1.9 | ||
working_directory: /go/src/github.com/99designs/gqlgen | ||
steps: &steps | ||
- image: docker:18 | ||
steps: | ||
- checkout | ||
- run: > | ||
curl -L -o /bin/dep https://github.com/golang/dep/releases/download/v0.4.1/dep-linux-amd64 && | ||
chmod +x /bin/dep && | ||
go get -u github.com/alecthomas/gometalinter github.com/vektah/gorunpkg && | ||
gometalinter --install && | ||
dep ensure -vendor-only | ||
- run: go install -v . && go get -u github.com/vektah/dataloaden github.com/pkg/errors | ||
- run: go generate ./... && if [[ $(git --no-pager diff) ]] ; then echo "you need to run go generate" ; git --no-pager diff ; exit 1 ; fi | ||
- run: go vet ./... | ||
- run: go test -race ./... | ||
- run: gometalinter --vendor ./... | ||
|
||
- setup_remote_docker: | ||
docker_layer_caching: true | ||
- run: | ||
name: "docker build" | ||
command: docker build -f .circleci/golang.Dockerfile -t gqlgen/golang . | ||
- run: | ||
name: "golang tests" | ||
command: docker run --rm gqlgen/golang .circleci/test.sh |
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,12 @@ | ||
FROM golang:1.10 | ||
|
||
RUN curl -L -o /bin/dep https://github.com/golang/dep/releases/download/v0.4.1/dep-linux-amd64 && chmod +x /bin/dep | ||
RUN go get -u github.com/alecthomas/gometalinter github.com/vektah/gorunpkg | ||
RUN gometalinter --install | ||
|
||
WORKDIR /go/src/github.com/99designs/gqlgen | ||
|
||
COPY Gopkg.* /go/src/github.com/99designs/gqlgen/ | ||
RUN dep ensure -v --vendor-only | ||
|
||
COPY . /go/src/github.com/99designs/gqlgen/ |
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,17 @@ | ||
#!/bin/bash | ||
|
||
set -eu | ||
|
||
echo "+++ generating" | ||
go generate -v ./... | ||
if [[ $(git --no-pager diff) ]] ; then | ||
echo "you need to run go generate" | ||
git --no-pager diff | ||
exit 1 | ||
fi | ||
|
||
echo "+++ running testsuite" | ||
go test -race ./... | ||
|
||
echo "+++ linting" | ||
gometalinter --vendor ./... |
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,3 @@ | ||
/example/chat/node_modules | ||
/codegen/tests/gen | ||
/vendor |
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