.gitlab-ci.yml 906 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 11 12 13 14 15 16 17 18 19 20 21 22
stages:
  - test
  - build

before_script:
#  - yarn install --frozen-lockfile --cache-folder .yarn
  - yarn install --frozen-lockfile
  - yarn ng --version

cache:
  key: "${CI_COMMIT_REF_SLUG}"
  paths:
    - node_modules/
#    - .yarn

lint:
  stage: test
Eduardo Sanz García's avatar
Eduardo Sanz García committed
23
  image: node:alpine
24
  tags: [docker]
Eduardo Sanz García's avatar
Eduardo Sanz García committed
25
  script:
26 27
    - yarn lint
  allow_failure: true
Eduardo Sanz García's avatar
Eduardo Sanz García committed
28 29 30

test:
  stage: test
31
  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/

Eduardo Sanz García's avatar
Eduardo Sanz García committed
39
docs:
40 41
  stage: test
  image: node:alpine
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 51
build:
  stage: build
  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