forked from adfinis/customer-center
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
65 lines (55 loc) · 1.97 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
---
language: node_js
node_js:
- "10"
sudo: required
dist: trusty
addons:
chrome: stable
cache:
yarn: true
services:
- docker
before_install:
- if [ "$DIR" = "backend" ]; then wget https://raw.githubusercontent.com/eficode/wait-for/master/wait-for; fi
- if [ "$DIR" = "backend" ]; then sudo service postgresql stop; fi
- if [ "$DIR" = "backend" ]; then while sudo lsof -Pi :5432 -sTCP:LISTEN -t; do sleep 1; done; fi
- if [ "$DIR" = "backend" ];
then
(docker run -d -p 4389:389
-v $PWD/tools/docker/ldap/ldap.ldif:/container/service/slapd/assets/config/bootstrap/ldif/custom
--env LDAP_ORGANISATION=adsy
--env LDAP_DOMAIN=adsy-ext.becs.adfinis-sygroup.ch
--env LDAP_ADMIN_PASSWORD=123qwe
--env LDAP_OPENLDAP_UID=1000
--env LDAP_OPENLDAP_GID=1000
--env LDAP_TLS=false
--env LDAP_BASE_DN=dc=adsy-ext,dc=becs,dc=adfinis-sygroup,dc=ch
osixia/openldap
--copy-service
--loglevel debug);
fi
- if [ "$DIR" = "backend" ]; then bash wait-for localhost:4389; fi
- if [ "$DIR" = "backend" ];
then
(docker run -d -p 5432:5432
-v $PWD/tools/docker/postgres/setup/:/docker-entrypoint-initdb.d/
-v $PWD/tools/docker/postgres/timed-test-data.sql:/tmp/timed-test-data.sql
--env POSTGRES_USER=test
--env POSTGRES_PASSWORD=test
--env POSTGRES_DB=customercenter
postgres)
fi
- if [ "$DIR" = "backend" ]; then bash wait-for localhost:5432; fi
- if [ "$DIR" = "backend" ]; then docker run -d -p 6379:6379 redis; fi
- if [ "$DIR" = "backend" ]; then bash wait-for localhost:6379; fi
- if [ "$DIR" = "backend" ]; then docker run -d -p 1080:1080 schickling/mailcatcher; fi
- if [ "$DIR" = "backend" ]; then bash wait-for localhost:1080; fi
install:
- (cd $DIR; yarn)
script:
- if [ "$DIR" = "backend" ]; then make -C backend/ test-migrations; fi
- (cd $DIR; yarn test)
env:
- JOBS=2 DIR=frontend
- JOBS=2 DIR=backend