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