Skip to content

Commit

Permalink
Switch to go modules
Browse files Browse the repository at this point in the history
  • Loading branch information
johanbrandhorst authored and achew22 committed Feb 19, 2019
1 parent ada3454 commit 6806a84
Show file tree
Hide file tree
Showing 9 changed files with 184 additions and 354 deletions.
28 changes: 13 additions & 15 deletions .circleci/config.yml
Expand Up @@ -3,29 +3,27 @@ jobs:
build:
docker:
- image: jfbrandhorst/grpc-gateway-build-env
working_directory: /go/src/github.com/grpc-ecosystem/grpc-gateway
working_directory: /src/grpc-gateway
steps:
- checkout
- run: dep ensure --vendor-only
- run: go build ./...
test:
docker:
- image: jfbrandhorst/grpc-gateway-build-env
working_directory: /go/src/github.com/grpc-ecosystem/grpc-gateway
working_directory: /src/grpc-gateway
environment:
GLOG_logtostderr: "1"
GLOG_logtostderr: '1'
steps:
- checkout
- run: dep ensure --vendor-only
- run: go test -race -coverprofile=coverage.txt ./...
- run: bash <(curl -s https://codecov.io/bash)
node_test:
docker:
- image: jfbrandhorst/grpc-gateway-build-env
working_directory: /go/src/github.com/grpc-ecosystem/grpc-gateway
working_directory: /src/grpc-gateway
steps:
- checkout
- run: dep ensure --vendor-only
- run: go mod vendor
- run: >
. $HOME/.nvm/nvm.sh &&
cd examples/browser &&
Expand All @@ -35,25 +33,25 @@ jobs:
generate:
docker:
- image: jfbrandhorst/grpc-gateway-build-env
working_directory: /go/src/github.com/grpc-ecosystem/grpc-gateway
working_directory: /src/grpc-gateway
steps:
- checkout
- run: make realclean
- run: make examples SWAGGER_CODEGEN="${SWAGGER_CODEGEN}" # Set in Docker image
- run: go mod tidy
- run: git diff --exit-code
lint:
docker:
- image: jfbrandhorst/grpc-gateway-build-env
working_directory: /go/src/github.com/grpc-ecosystem/grpc-gateway
working_directory: /src/grpc-gateway
steps:
- checkout
- run: dep ensure --vendor-only
- run: go get golang.org/x/lint/golint
- run: make lint
bazel:
docker:
- image: l.gcr.io/google/bazel:latest
working_directory: /go/src/github.com/grpc-ecosystem/grpc-gateway
working_directory: /src/grpc-gateway
steps:
- checkout
- run:
Expand All @@ -67,22 +65,22 @@ jobs:
- run:
name: Check that Bazel BUILD files are up-to-date
command: 'test -z "$(bazel run //:gazelle_diff)" ||
(echo "ERROR: Bazel files out-of-date, please run \`bazel run :gazelle_fix\`" >&2; exit 1)'
(echo "ERROR: Bazel files out-of-date, please run \`bazel run :gazelle_fix\`" >&2; exit 1)'
- run:
name: Run tests with Bazel
command: bazel test //...
- run:
name: Check formatting of Bazel BUILD files
command: 'bazel run //:buildifier_check ||
(echo "ERROR: Bazel files not formatted, please run \`bazel run :buildifier\`" >&2; exit 1)'
(echo "ERROR: Bazel files not formatted, please run \`bazel run :buildifier\`" >&2; exit 1)'
when: always
release:
docker:
- image: jfbrandhorst/grpc-gateway-build-env
working_directory: /go/src/github.com/grpc-ecosystem/grpc-gateway
working_directory: /src/grpc-gateway
steps:
- checkout
- run: dep ensure --vendor-only
- run: go mod vendor
- run: curl -sL https://git.io/goreleaser | bash
workflows:
version: 2
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -10,3 +10,6 @@ bazel-testlogs

# Go vendor directory
vendor

# Generated travis files
.travis.yml
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Expand Up @@ -24,8 +24,8 @@ All submissions, including submissions by project members, require review.
Great, it should be as simple as thus (run from the root of the directory):

```bash
docker run -v $(pwd):/go/src/github.com/grpc-ecosystem/grpc-gateway --rm jfbrandhorst/grpc-gateway-build-env \
/bin/bash -c 'cd /go/src/github.com/grpc-ecosystem/grpc-gateway && \
docker run -v $(pwd):/src/grpc-gateway --rm jfbrandhorst/grpc-gateway-build-env \
/bin/bash -c 'cd /src/grpc-gateway && \
make realclean && \
make examples SWAGGER_CODEGEN="${SWAGGER_CODEGEN}"'
docker run -itv $(pwd):/grpc-gateway -w /grpc-gateway --entrypoint /bin/bash --rm \
Expand Down
192 changes: 0 additions & 192 deletions Gopkg.lock

This file was deleted.

66 changes: 0 additions & 66 deletions Gopkg.toml

This file was deleted.

0 comments on commit 6806a84

Please sign in to comment.