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: ...@@ -8,6 +8,9 @@ services:
- postgres - postgres
variables: variables:
POSTGRES_DB: sigma_staging
POSTGRES_USER: sigma
POSTGRES_PASSWORD: "sigma_pw"
# This folder is cached between builds # This folder is cached between builds
cache: cache:
...@@ -24,8 +27,6 @@ stages: ...@@ -24,8 +27,6 @@ stages:
# Install dependencies, compile the bundle.js, # Install dependencies, compile the bundle.js,
build:transpile: build:transpile:
stage: build stage: build
before_script:
- export NODE_ENV=staging
script: script:
- npm ci - npm ci
- npm run build - npm run build
...@@ -33,9 +34,15 @@ build:transpile: ...@@ -33,9 +34,15 @@ build:transpile:
paths: paths:
- build/ - build/
tests: tests:mocha:
stage: tests stage: tests
script: script:
- npm ci
- echo '{"dn":"dn", "passwd":"passwd"}' >> ldap_credentials.json - 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 - 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