.gitlab-ci.yml 1.08 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
  image: esanzgar/node-chromium
31
  tags: [docker]
Eduardo Sanz García's avatar
Eduardo Sanz García committed
32
  script:
33
    - yarn test:sr:chromium
Eduardo Sanz García's avatar
Eduardo Sanz García committed
34 35 36 37
  artifacts:
    paths:
      - coverage/

Eduardo Sanz García's avatar
Eduardo Sanz García committed
38
docs:
39
  stage: test
40 41
  image: node:10.15.0-alpine
  # image: node:alpine # replace when node-sass@4.9.4 compiles on the latest
42
  tags: [docker]
43 44 45 46 47 48
  script:
    - yarn docs
  artifacts:
    paths:
      - docs/

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