Skip to content

Commit

Permalink
Merge #1
Browse files Browse the repository at this point in the history
1: Initial Commit r=Jaskaranbir a=Jaskaranbir



Co-authored-by: Jaskaranbir <jaskaranbir.dhillon@gmail.com>
  • Loading branch information
ninja-bruh and Jaskaranbir committed Nov 13, 2018
2 parents 719edf1 + 4bdce84 commit c1aa7dd
Show file tree
Hide file tree
Showing 14 changed files with 918 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.history
.vscode
vendor*
debug*
17 changes: 17 additions & 0 deletions .golangci.yml
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
55 changes: 55 additions & 0 deletions .travis.yml
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
24 changes: 24 additions & 0 deletions Dockerfile_test
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 ./...
Loading

0 comments on commit c1aa7dd

Please sign in to comment.