.gitlab-ci.yml 1007 Bytes
Newer Older
Erick Hitter's avatar
Erick Hitter committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
image: containers.ethitter.com:443/docker/images/golang:latest

variables:
  REPO_NAME: git.ethitter.com/debian/gitlab-runner-do-monitor

cache:
  paths:
    - /apt-cache
    - $GOPATH/src/github.com
    - $GOPATH/src/golang.org
    - $GOPATH/src/google.golang.org
    - $GOPATH/src/gopkg.in

stages:
  - test
  - build

before_script:
  - mkdir -p $GOPATH/src/$(dirname $REPO_NAME)
  - cp -R $CI_PROJECT_DIR $GOPATH/src/$REPO_NAME
  - cd $GOPATH/src/$REPO_NAME
  - cp config-sample.json config.json

  - export CC=clang-5.0

  - make dep

unit_tests:
  stage: test
  script:
    - make test

race_detector:
  stage: test
  script:
    - make race

memory_sanitizer:
  stage: test
  script:
    - make msan

code_coverage:
  stage: test
  script:
    - make coverage

code_coverage_report:
  stage: test
  script:
    - make coverhtml
  only:
  - master

lint_code:
  stage: test
  script:
    - make lint

build:
  stage: build
  script:
    - make
  artifacts:
    paths:
      - gitlab-runner-do-monitor/