Feature/cypressio

This commit is contained in:
Plup
2020-05-19 13:13:30 +00:00
committed by Jean-Baptiste Pasquier
parent beed19cb42
commit 9df738a15f
19 changed files with 1614 additions and 7 deletions

View File

@ -1,13 +1,56 @@
image: node:11
# workflow
stages:
- build
- test
- integration
- acceptance
- release
- deployment
# default image for jobs
default:
image: node:11
# cache modules between jobs
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- .npm/
## BUILD ##
build:
stage: build
before_script:
- npm ci --cache .npm --prefer-offline --only=production
script:
- cp config.sample.json config.json
- npm run build
artifacts:
when: on_success
expire_in: 1 day
paths:
- dist/
tags:
- test
## TESTING ##
test:e2e:
stage: test
image: cypress/included:4.5.0
services:
- name: ${CI_REGISTRY_IMAGE}/server:0.1
before_script:
# install missing dependencies
- npm install -g sirv-cli
# making sure the process is orphan
- sirv dist --port 3000 > /dev/null 2>&1 &
script:
- cypress run -e CYPRESS_baseUrl=http://localhost:3000
tags:
- test
## VALIDATION ##
test1: