.gitlab-ci.yml 648 Bytes
Newer Older
1 2 3 4
stages:
  - test
  - deploy

5
trigger:
6
  stage: deploy
7 8
  only:
    - master
9
  script:
10
    - "curl -X POST -F token=$GITLAB_TOKEN -F ref=master https://git.ok1kvk.cz/api/v3/projects/72/trigger/builds"
11

12 13 14
basictest:
  stage: test
  script:
15 16 17
    - node --version
    - npm --version
    - npm install
18 19 20 21 22
    - node index.js --contentdir sitegin/tests/content --staticdir sitegin/tests/static --builddir build --noserver

unittest:
  stage: test
  script:
23 24 25
    - node --version
    - npm --version
    - npm install
26 27 28 29 30 31 32 33 34
    - npm test
  artifacts:
    paths:
      - coverage

cache:
  paths:
    - node_modules

35 36
# needs following env variable: $GITLAB_TOKEN