-
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.
1: Initial Commit r=Jaskaranbir a=Jaskaranbir Co-authored-by: Jaskaranbir <jaskaranbir.dhillon@gmail.com>
- Loading branch information
Showing
14 changed files
with
918 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.history | ||
.vscode | ||
vendor* | ||
debug* |
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 @@ | ||
linters: | ||
enable: | ||
- dupl | ||
- gocyclo | ||
- maligned | ||
- misspell | ||
- lll | ||
- unparam | ||
|
||
linters-settings: | ||
errcheck: | ||
check-type-assertions: true | ||
check-blank: true | ||
lll: | ||
line-length: 90 | ||
unparam: | ||
algo: rta |
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,55 @@ | ||
dist: trusty | ||
|
||
services: | ||
- docker | ||
|
||
language: go | ||
|
||
go: | ||
- "1.11" | ||
|
||
branches: | ||
except: | ||
- staging.tmp | ||
|
||
env: | ||
global: | ||
- DOCKER_COMPOSE_VERSION=1.22.0 | ||
|
||
before_install: | ||
# Docker-Compose | ||
- sudo rm /usr/local/bin/docker-compose | ||
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname | ||
-s`-`uname -m` > docker-compose | ||
- chmod +x docker-compose | ||
- sudo mv docker-compose /usr/local/bin | ||
|
||
addons: | ||
apt: | ||
packages: | ||
- docker-ce | ||
- jq | ||
hosts: | ||
- kafka | ||
|
||
install: true | ||
|
||
before_script: | ||
- chmod +x ./run_test.sh | ||
|
||
script: | ||
- ./run_test.sh | ||
|
||
after_script: | ||
- docker-compose -f ./test/docker-compose.yaml down --volumes --rmi local | ||
|
||
before_deploy: | ||
- export GIT_BRANCH=master | ||
|
||
deploy: | ||
provider: script | ||
skip_cleanup: true | ||
script: curl -sL https://git.io/fAgkD | bash | ||
on: | ||
all_branches: true | ||
tags: true |
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,24 @@ | ||
# Dockerfile used to build the image in which the tests are run. | ||
FROM golang:1.11.1-stretch | ||
LABEL maintainer="Jaskaranbir Dhillon" | ||
|
||
ARG SOURCE_REPO | ||
|
||
ENV DEP_VERSION=0.5.0 | ||
|
||
# Download and install dep and git | ||
ADD https://github.com/golang/dep/releases/download/v${DEP_VERSION}/dep-linux-amd64 /usr/bin/dep | ||
RUN chmod +x /usr/bin/dep | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y build-essential | ||
|
||
WORKDIR $GOPATH/src/github.com/TerrexTech/${SOURCE_REPO} | ||
|
||
# Copy the code from the host and compile it | ||
COPY Gopkg.toml Gopkg.lock ./ | ||
RUN dep ensure --vendor-only -v | ||
|
||
COPY . ./ | ||
|
||
ENTRYPOINT go test -v -race ./... |
Oops, something went wrong.