loginsrv

Unnamed repository; edit this file 'description' to name the repository.
git clone git@jamesshield.xyz:repos/loginsrv.git
Log | Files | Refs | README | LICENSE

commit 93dc953a3fe856ed1fe880544a22ce7986f628f2
parent 40a67d8e54e0732830554336f7cec8c90828ce94
Author: Sebastian Mancke <s.mancke@tarent.de>
Date:   Sat, 19 Nov 2016 15:33:34 +0100

added travis build configuration

Diffstat:
A.generate_coverage.sh | 19+++++++++++++++++++
A.travis.yml | 27+++++++++++++++++++++++++++
ADockerfile | 5+++++
3 files changed, 51 insertions(+), 0 deletions(-)

diff --git a/.generate_coverage.sh b/.generate_coverage.sh @@ -0,0 +1,19 @@ +#!/bin/bash -e +# Requires installation of: `github.com/wadey/gocovmerge` + +cd $GOPATH/src/github.com/smancke/guble + +rm -rf ./cov +mkdir cov + +i=0 +for dir in $(find . -maxdepth 10 -not -path './.git*' -not -path '*/_test.go' -type d); +do + if ls ${dir}/*.go &> /dev/null; then + go test -v -covermode=atomic -coverprofile=./cov/$i.out ./${dir} + i=$((i+1)) + fi +done + +gocovmerge ./cov/*.out > full_cov.out +rm -rf ./cov diff --git a/.travis.yml b/.travis.yml @@ -0,0 +1,27 @@ +language: go + +go: + - tip + +services: + - docker + +before_install: + - go get github.com/wadey/gocovmerge + - go get github.com/mattn/goveralls + - go get golang.org/x/tools/cmd/cover + +script: + - go test -v ./... + - go vet ./... + +after_success: + - ./.generate_coverage.sh + - goveralls -coverprofile=full_cov.out -service=travis-ci + - if [ "$TRAVIS_BRANCH" == "master" ]; then + GOOS=linux go build -a --ldflags '-linkmode external -extldflags "-static"' . ; + docker build -t tarent/loginsrv . ; + docker login -e="$DOCKER_EMAIL" -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" ; + docker push tarent/loginsrv ; + fi + diff --git a/Dockerfile b/Dockerfile @@ -0,0 +1,5 @@ + +FROM alpine +COPY loginsrv / +ENTRYPOINT ["/loginsrv"] +EXPOSE 6789