GitHub actions (#7035)

* Trying to setup GitHub Actions

* Try to fix the workflow steps

* Fix NODE_VERSION

* Fix services

* Fix services 2

* Fix redis service, remove docker service

* Missing npm install

* Fix Use Node.js step name

* Remove greenkeeper

* I believe we do not need this command

* Try to include postgres

* Fix postgres script

* Remove before install script

* Fix postgres before script

* Try to fix connection to postgres

* Fix postgress port

* Postgres host

* Still trying to connect on postgres

* Still trying to connect on postgres - localhost

* Split postgres in a separate job

* Add postgres healthcheck

* Set postgres just like github example

* Fix postgres scripts with new credentials

* Still trying to fix postgres connection

* Now it looks only the username is wrong

* Passing postgres password in the right way

* try to install postgis

* New attempt to install postgis

* Fix postgis image name

* Try to output tests

* We need to start mongo

* Increase tests timeout

* Fix flaky test

* Add GitHub Actions badge

* Badge as html

* Fix badge link

* Remove Travis

* try to fix coverage

* Fix flaky test

* Improve ci workflow

* Change the mongo default test version

* Fix the job name in the if clause

* Ubuntu18.0.4

* Downgrade to 4.0.21

* Fix cache keys:

* Trying with mongo 4.0.4

* Rever os and mongo versions

* remove latest node
This commit is contained in:
Antonio Davi Macedo Coelho de Castro
2020-12-03 08:15:48 -08:00
committed by GitHub
parent da905a357d
commit 54a61b7694
6 changed files with 123 additions and 123 deletions

View File

@@ -1,34 +0,0 @@
#!/bin/bash
set -e
source ~/.nvm/nvm.sh
echo "[SCRIPT] Before Install Script :: Setup Postgres ${POSTGRES_MAJOR_VERSION}"
nvm install $NODE_VERSION
nvm use $NODE_VERSION
npm install -g greenkeeper-lockfile@1
if [[ $POSTGRES_MAJOR_VERSION -lt 11 ]]; then
# Setup postgres 9 or 10
sudo sed -i 's/port = 5432/port = 5433/' /etc/postgresql/${POSTGRES_MAJOR_VERSION}/main/postgresql.conf
# Stop the current running service
sudo service postgresql stop
# Remove correct version of postgres
if [[ $POSTGRES_MAJOR_VERSION -lt 10 ]]; then
sudo apt-get remove -q 'postgresql-10.*'
else
sudo apt-get remove -q 'postgresql-9.*'
fi
sudo service postgresql start
else
# Setup postgres 11 or higher
#Copy defauilt hba config file and tell postgres to restart
sudo cp /etc/postgresql/{10,${POSTGRES_MAJOR_VERSION}}/main/pg_hba.conf
sudo systemctl restart postgresql@${POSTGRES_MAJOR_VERSION}-main
fi

View File

@@ -4,10 +4,7 @@ set -e
echo "[SCRIPT] Before Script :: Setup Parse DB for Postgres ${POSTGRES_MAJOR_VERSION}"
node -e 'require("./lib/index.js")'
greenkeeper-lockfile-update
psql -v ON_ERROR_STOP=1 -p 5433 --username "postgres" --dbname "${POSTGRES_DB}" <<-EOSQL
PGPASSWORD=postgres psql -v ON_ERROR_STOP=1 -h localhost -U postgres <<-EOSQL
CREATE DATABASE parse_server_postgres_adapter_test_database;
\c parse_server_postgres_adapter_test_database;
CREATE EXTENSION postgis;