From 4b0f16005313de5afdb25090e71c9a9357dca42a Mon Sep 17 00:00:00 2001
From: Erick Hitter <services@ethitter.com>
Date: Sun, 16 Jul 2017 02:57:05 +0000
Subject: [PATCH] Add .gitlab-ci.yml

---
 .gitlab-ci.yml | 44 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100644 .gitlab-ci.yml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..8f85f3e
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,44 @@
+# This file is a template, and might need editing before it works on your project.
+image: golang:latest
+
+# The problem is that to be able to use go get, one needs to put
+# the repository in the $GOPATH. So for example if your gitlab domain
+# is mydomainperso.com, and that your repository is repos/projectname, and
+# the default GOPATH being /go, then you'd need to have your
+# repository in /go/src/mydomainperso.com/repos/projectname 
+# Thus, making a symbolic link corrects this.
+# before_script:
+#    - ln -s /builds /go/src/mydomainperso.com
+#    - cd /go/src/mydomainperso.com/repos/projectname
+
+stages:
+    - test
+    - build
+
+format:
+    stage: test
+    script:
+        # Add here all the dependencies, or use glide/govendor to get
+        # them automatically.
+        # - curl https://glide.sh/get | sh
+        - go get github.com/42wim/matterbridge/matterhook
+        - go get github.com/asaskevich/govalidator
+        - go get github.com/hpcloud/tail
+        - go get github.com/alecthomas/kingpin
+        - go tool vet -composites=false -shadow=true *.go
+        - go test -race $(go list ./... | grep -v /vendor/)
+
+compile:
+    stage: build
+    script:
+        # Add here all the dependencies, or use glide/govendor/...
+        # to get them automatically.
+        - go get github.com/42wim/matterbridge/matterhook
+        - go get github.com/asaskevich/govalidator
+        - go get github.com/hpcloud/tail
+        - go get github.com/alecthomas/kingpin
+        # Better put this in a Makefile
+        - go build -race -ldflags "-extldflags '-static'" -o mybinary
+    artifacts:
+        paths:
+            - mybinary
-- 
GitLab