-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
63 lines (52 loc) · 1.79 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
language: node_js
node_js:
- "node"
cache: npm
addons:
apt:
update: true
packages:
- sqlite3
services:
# Use docker for the databases, so that we can support Microsoft SQL Server in the tests.
- docker
env:
global:
- SQLITE=y
# Docker-based database settings.
# These values are based on the docker-compose parameters.
# MySQL has some timestamp precision issues
# that are being investigated.
#- MYSQL_DB=tern
#- MYSQL_USERNAME=tern-user
#- MYSQL_PASSWORD=tern-pw
#- MYSQL_PORT=19000
- POSTGRES_DB=tern
- POSTGRES_USERNAME=tern-user
- POSTGRES_PASSWORD=tern-pw
- POSTGRES_PORT=19001
# MariaDB has some timestamp precision issues
# that are being investigated.
# - MARIADB_DB=tern
# - MARIADB_USERNAME=tern-user
# - MARIADB_PASSWORD=tern-pw
# - MARIADB_PORT=19002
- MSSQL_DB=master
- MSSQL_USERNAME=sa
- MSSQL_PASSWORD=tern-pw-1234
- MSSQL_PORT=19003
#before_install:
install:
- docker-compose -f packages/datastore-sql/docker-tests/docker-compose.yml up -d
- npm install
- npm run bootstrap
# Wait for the docker services to start
- echo "Waiting for MySQL" ; timeout 22 bash -c 'until printf "" 2>>/dev/null >>/dev/tcp/$0/$1; do sleep 1; done' localhost 19000
- echo "Waiting for PostGreSQL" ; timeout 22 bash -c 'until printf "" 2>>/dev/null >>/dev/tcp/$0/$1; do sleep 1; done' localhost 19001
- echo "Waiting for MariaDB" ; timeout 22 bash -c 'until printf "" 2>>/dev/null >>/dev/tcp/$0/$1; do sleep 1; done' localhost 19002
- echo "Waiting for MS SQL" ; timeout 22 bash -c 'until printf "" 2>>/dev/null >>/dev/tcp/$0/$1; do sleep 1; done' localhost 19003
jobs:
include:
- stage: "Build and Test"
name: "TypeScript Compile and Test"
script: "npm run build && npm run test"