Files
geovisio-website/.gitlab-ci.yml
Adrien Pavie c5f9a6da06 Update docs
2023-06-14 15:21:31 +00:00

61 lines
1.3 KiB
YAML

stages:
- 'Install'
- 'Test'
- 'Deploy'
variables:
CYPRESS_CACHE_FOLDER: '$CI_PROJECT_DIR/cache/Cypress'
before_script:
## chmod is unfortunately currently mandatory : https://github.com/nodejs/docker-node/issues/661
- npm install -g yarn@1.22.19 && chmod +x /usr/local/lib/node_modules/yarn/bin/yarn.js
cache:
paths:
- node_modules
install:
stage: Install
image: node:18.16.0
script:
- yarn install
- ls node_modules/.bin/cypress
test:unit:
stage: Test
image: node:18.16.0
script:
- yarn test:unit
coverage: /All files[^|]*\|[^|]*\s+([\d\.]+)/
test:e2e:
stage: Test
image: cypress/browsers:node-18.16.0-chrome-113.0.5672.92-1-ff-113.0-edge-113.0.1774.35-1
script:
- yarn install
- ./node_modules/.bin/cypress install
- echo "VITE_API_URL=https://geovisio-proxy-dev.osc-fr1.scalingo.io/" > .env
- echo "VITE_ENV=dev" >> .env
- PORT=5173 yarn start &
- yarn test:e2e
coverage: /All files[^|]*\|[^|]*\s+([\d\.]+)/
artifacts:
when: always
paths:
- cypress/videos/**/*.mp4
- cypress/screenshots/**/*.png
expire_in: 1 day
deploy:
stage: Deploy
image: node:18.16.0
cache:
paths:
- node_modules
variables:
CI: 1
script:
- yarn install
- yarn upgrade geovisio@develop
- yarn build