.gitlab-ci.yml 897 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
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/

37
pages:
38
  stage: test
39
  image: node:alpine
40
  tags: [docker]
41 42
  script:
    - yarn docs
43 44
    - mkdir public
    - cp -r docs/* public/
45 46
  artifacts:
    paths:
47
      - public
48

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