.gitlab-ci.yml 849 Bytes
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
Eduardo Sanz García's avatar
Eduardo Sanz García committed
21
  image: node:alpine
22
  tags: [docker]
Eduardo Sanz García's avatar
Eduardo Sanz García committed
23
  script:
24 25
    - yarn lint
  allow_failure: true
Eduardo Sanz García's avatar
Eduardo Sanz García committed
26 27 28

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

Eduardo Sanz García's avatar
Eduardo Sanz García committed
37
docs:
38 39
  stage: test
  image: node:alpine
40
  tags: [docker]
41 42 43 44 45 46
  script:
    - yarn docs
  artifacts:
    paths:
      - docs/

Eduardo Sanz García's avatar
Eduardo Sanz García committed
47 48 49
build:
  stage: build
  image: node:alpine
50
  tags: [docker]
Eduardo Sanz García's avatar
Eduardo Sanz García committed
51
  script:
52
    - yarn packagr
Eduardo Sanz García's avatar
Eduardo Sanz García committed
53 54 55 56 57 58
  artifacts:
    name: "${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
    paths:
      - dist-lib/
  only:
    - master