.gitlab-ci.yml: do not run tests and builds on master

This commit is contained in:
Adhityaa Chandrasekar
2018-07-26 21:56:04 +05:30
parent 4bae1bf370
commit 62d8e0b1dd

View File

@@ -10,6 +10,8 @@ build-src:
image: debian:buster
variables:
GOPATH: $CI_PROJECT_DIR
except:
- master
script:
- apt update
- apt install -y curl gnupg git make golang
@@ -26,6 +28,8 @@ build-docker:
image: docker:stable
services:
- docker:dind
except:
- master
script:
- docker build -t commento-ce .
@@ -40,6 +44,8 @@ go-test:
POSTGRES_DB: commento_test
COMMENTO_POSTGRES: postgres://postgres:postgres@postgres/commento_test?sslmode=disable
GOPATH: $CI_PROJECT_DIR
except:
- master
script:
- mkdir -p src/gitlab.com/commento && cd src/gitlab.com/commento && ln -s $CI_PROJECT_DIR && cd $CI_PROJECT_NAME
- make test
@@ -47,6 +53,8 @@ go-test:
go-fmt:
stage: go-fmt
image: golang:1.10.2
except:
- master
script:
- cd api
- test -z $(go fmt)