--- include: - project: infra/gitlab ref: master file: templates/nodejs.ci.yml cache: key: ${CI_COMMIT_REF_SLUG} paths: - .npm/ - cache/Cypress - dist/ default: image: node:14 stages: - build - test - publish build: stage: build before_script: - npm ci --cache .npm --prefer-offline --only=production - npm install -g semantic-release@v17.1 @semantic-release/gitlab@6.0.5 script: - npm run build artifacts: when: on_success expire_in: 1 day paths: - dist/ except: - tags - feature/ansible tags: - test test:e2e: stage: test image: name: cypress/included:7.6.0 entrypoint: [""] services: - name: ${CI_REGISTRY_IMAGE}/djangoldp:latest alias: djangoldp before_script: # install missing dependencies - npm ci --cache .npm --prefer-offline --only=production - npm install cypress-localstorage-commands cypress-terminal-report # making sure the process is orphan - npm run watch > /dev/null 2>&1 & script: - cypress run -e CYPRESS_baseUrl=http://localhost:3000 # - cypress run -e CYPRESS_baseUrl=http://localhost:3000 --record --key 8f258fb9-56ca-4773-b7e4-a4c62762bfb7 except: - tags - feature/ansible tags: - test publish: stage: publish extends: .publish_npm only: - master - beta