forked from nditech/CyberSim-Backend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuildspec.yml
More file actions
22 lines (21 loc) · 713 Bytes
/
Copy pathbuildspec.yml
File metadata and controls
22 lines (21 loc) · 713 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
version: 0.2
env:
variables:
POSTGRES_USER: test
POSTGRES_PASSWORD: password
POSTGRES_DB: ndi_test
DB_URL: postgres://test:password@localhost:5432/ndi
phases:
install:
runtime-versions:
nodejs: 12
commands:
- echo "Node version 12 installed"
- echo "Installing source NPM dependencies..."
- npm install
build:
commands:
- echo "Running postgres"
- docker run --name postgres -e POSTGRES_USER=$POSTGRES_USER -e POSTGRES_PASSWORD=$POSTGRES_PASSWORD -e POSTGRES_DB=$POSTGRES_DB -d -p 5432:5432 postgres:12.3-alpine
- echo "Testing node application"
- while !</dev/tcp/localhost/5432; do sleep 1; done; echo "Should run npm run test"