36 lines
561 B
YAML
36 lines
561 B
YAML
image: node:alpine
|
|
|
|
stages:
|
|
- prepare
|
|
- test
|
|
|
|
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++
|
|
- npm config set registry http://registry.npmjs.org/
|
|
- npm install
|
|
artifacts:
|
|
paths:
|
|
- node_modules/
|
|
|
|
tests:
|
|
stage: test
|
|
script:
|
|
- npm test
|