Skip to content

Commit e6e5a8c

Browse files
authored
Travis postgres update: removing unnecessary start of mongo-runner (#6594)
* use pg-promise native pg-connection-string to parse uri instead of ParseConfigParser.js. The allows for a more felxible uri for ssl and other params * Revert "use pg-promise native pg-connection-string to parse uri instead of ParseConfigParser.js. The allows for a more felxible uri for ssl and other params" This reverts commit a5926d3. * Updating travis postgres and removing unnecessary start of mongo-runner. Ensuring before_script and before_install matches the rest of travis
1 parent 0075c66 commit e6e5a8c

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ jobs:
5050
env: POSTGRES_MAJOR_VERSION=11 PARSE_SERVER_TEST_DB=postgres PARSE_SERVER_TEST_DATABASE_URI=postgres://localhost:5433/parse_server_postgres_adapter_test_database
5151
before_install: bash scripts/before_install_postgres.sh
5252
before_script: bash scripts/before_script_postgres.sh
53+
script:
54+
- npm run lint
55+
- npm run coverage
5356
- stage: release
5457
node_js: '10'
5558
env:

scripts/before_install_postgres.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
#!/bin/bash
2-
2+
33
set -e
4+
source ~/.nvm/nvm.sh
45

56
echo "[SCRIPT] Before Install Script :: Setup Postgres ${POSTGRES_MAJOR_VERSION}"
67

8+
nvm install $NODE_VERSION
9+
nvm use $NODE_VERSION
10+
npm install -g greenkeeper-lockfile@1
11+
712
if [[ $POSTGRES_MAJOR_VERSION -lt 11 ]]; then
813
# Setup postgres 9 or 10
914
sudo sed -i 's/port = 5432/port = 5433/' /etc/postgresql/${POSTGRES_MAJOR_VERSION}/main/postgresql.conf
@@ -20,7 +25,7 @@ if [[ $POSTGRES_MAJOR_VERSION -lt 11 ]]; then
2025

2126
sudo service postgresql start
2227

23-
else
28+
else
2429
# Setup postgres 11 or higher
2530

2631
#Copy defauilt hba config file and tell postgres to restart

scripts/before_script_postgres.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
#!/bin/bash
2-
2+
33
set -e
44

55
echo "[SCRIPT] Before Script :: Setup Parse DB for Postgres ${POSTGRES_MAJOR_VERSION}"
66

7+
node -e 'require("./lib/index.js")'
8+
greenkeeper-lockfile-update
9+
710
psql -v ON_ERROR_STOP=1 -p 5433 --username "postgres" --dbname "${POSTGRES_DB}" <<-EOSQL
811
CREATE DATABASE parse_server_postgres_adapter_test_database;
912
\c parse_server_postgres_adapter_test_database;
1013
CREATE EXTENSION postgis;
1114
CREATE EXTENSION postgis_topology;
1215
EOSQL
13-

0 commit comments

Comments
 (0)