.gitlab-ci.yml 1.17 KB
Newer Older
Eduardo Sanz García's avatar
Eduardo Sanz García committed
1 2 3 4 5
# Needed to launch the image
variables:
  USER_ID: "$(id -u)"
  GROUP_ID: "$(id -g)"

6 7 8 9 10
stages:
  - test
  - build

before_script:
11
  - yarn install --frozen-lockfile --cache-folder .yarn
12 13 14 15 16
  - yarn ng --version

cache:
  key: "${CI_COMMIT_REF_SLUG}"
  paths:
17
    - .yarn
18 19 20

lint:
  stage: test
21 22
  image: node:10.15.0-alpine
  # image: node:alpine # replace when node-sass@4.9.4 compiles on the latest
23
  tags: [docker]
Eduardo Sanz García's avatar
Eduardo Sanz García committed
24
  script:
25 26
    - yarn lint
  allow_failure: true
Eduardo Sanz García's avatar
Eduardo Sanz García committed
27 28 29

test:
  stage: test
30 31
  image: esanzgar/node-chromium:10-node-chromium
  # image: esanzgar/node-chromium
32
  tags: [docker]
Eduardo Sanz García's avatar
Eduardo Sanz García committed
33
  script:
34
    - yarn test:sr:chromium
Eduardo Sanz García's avatar
Eduardo Sanz García committed
35 36 37 38
  artifacts:
    paths:
      - coverage/

39
pages:
40
  stage: test
41 42
  image: node:10.15.0-alpine
  # image: node:alpine # replace when node-sass@4.9.4 compiles on the latest
43
  tags: [docker]
44 45
  script:
    - yarn docs
46 47
    - mkdir public
    - cp -r docs/* public/
48 49
  artifacts:
    paths:
50
      - public
51

Eduardo Sanz García's avatar
Eduardo Sanz García committed
52 53
build:
  stage: build
54 55
  image: node:10.15.0-alpine
  # image: node:alpine # replace when node-sass@4.9.4 compiles on the latest
56
  tags: [docker]
Eduardo Sanz García's avatar
Eduardo Sanz García committed
57
  script:
58
    - yarn packagr
Eduardo Sanz García's avatar
Eduardo Sanz García committed
59 60 61 62 63 64
  artifacts:
    name: "${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
    paths:
      - dist-lib/
  only:
    - master