.gitlab-ci.yml 597 Bytes
Newer Older
tavit ohanian's avatar
tavit ohanian 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
stages:
  - build
  - test

variables:
  BUILD_DIR: "/tmp/$CI_CONCURRENT_PROJECT_ID"

before_script:
  - mkdir -p $BUILD_DIR/src
  - cd $BUILD_DIR/src
  - if [ -d $CI_PROJECT_DIR ]
  - then
  -    echo "soft link $CI_PROJECT_DIR exists"
  - else
  -    echo "creating soft link $CI_PROJECT_DIR"
  -    ln -s $CI_PROJECT_DIR
  - fi
  - cd $CI_PROJECT_DIR

build:
  stage: build
  tags:
    - testing
  script:
    - echo $CI_JOB_STAGE
    - go build

test:
  stage: test
  tags:
    - testing
  script:
    - echo $CI_JOB_STAGE
    - go test -cover
  coverage: '/coverage: \d+.\d+% of statements/'