Skip to content
Snippets Groups Projects
Commit b300b8bc authored by Olivér FACKLAM's avatar Olivér FACKLAM
Browse files

[Gitlab CI] Set up tests

parent 52bd2fe8
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,9 @@ services:
- postgres
variables:
POSTGRES_DB: sigma_staging
POSTGRES_USER: sigma
POSTGRES_PASSWORD: "sigma_pw"
# This folder is cached between builds
cache:
......@@ -24,8 +27,6 @@ stages:
# Install dependencies, compile the bundle.js,
build:transpile:
stage: build
before_script:
- export NODE_ENV=staging
script:
- npm ci
- npm run build
......@@ -33,9 +34,15 @@ build:transpile:
paths:
- build/
tests:
tests:mocha:
stage: tests
script:
- npm ci
- echo '{"dn":"dn", "passwd":"passwd"}' >> ldap_credentials.json
- npm i
- export TARGET_ENV=staging
- export DB_HOST=postgres
- cd db
- knex migrate:latest --env staging
- knex seed:run --env staging
- cd ..
- npm run test
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment