.gitlab-ci.yml 755 Bytes
Newer Older
Eduardo Sanz García's avatar
Eduardo Sanz García committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
stages:
  - prepare
  - test
  - build

# Needed to launch the image
variables:
  USER_ID: "$(id -u)"
  GROUP_ID: "$(id -g)"

prepare:
  stage: prepare
  image: node:alpine
  script:
    - yarn
    - yarn ng -- --version # Display version information
  artifacts:
    paths:
      - node_modules/
    expire_in: 1 hour

test:
  stage: test
24
  image: psafont/angular-cli_build
Eduardo Sanz García's avatar
Eduardo Sanz García committed
25
  script:
26
    - yarn test:sr:chromium
Eduardo Sanz García's avatar
Eduardo Sanz García committed
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
  artifacts:
    paths:
      - coverage/
    expire_in: 1 week

lint:
  stage: test
  image: node:alpine
  script:
    - yarn lint
  allow_failure: true

build:
  stage: build
  image: node:alpine
  script:
    - yarn build:prod
  artifacts:
    name: "${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
    paths:
      - dist-lib/
  only:
    - master