image: node:alpine
stages:
- prepare
- test
- deploy
services:
- postgres:latest
cache:
untracked: true
key: $CI_COMMIT_REF_SLUG
paths:
- node_modules/
variables:
POSTGRES_DB: "letu"
POSTGRES_USER: "letu"
POSTGRES_PASSWORD: "letu"
POSTGRES_HOST_AUTH_METHOD: trust
NODE_ENV: "test"
install_requirements:
stage: prepare
script:
- apk add --no-cache python make g++ crul
- npm config set registry http://registry.npmjs.org/
- npm install
artifacts:
tests:
stage: test
- npm test
deploy:
stage: deploy
- curl -fL https://letu.flifloo.fr/git