From 12e834c12bdf887cdb424d5bbfac0bdf55a5f812 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 22 Jun 2023 14:38:32 +0200 Subject: [PATCH] Test CI --- .github/workflows/github_ci_php71_pgsql.yml | 5 +++- .travis.yml | 26 ++++++++++++--------- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/.github/workflows/github_ci_php71_pgsql.yml b/.github/workflows/github_ci_php71_pgsql.yml index 9ef70c2ae90..b36dd125659 100644 --- a/.github/workflows/github_ci_php71_pgsql.yml +++ b/.github/workflows/github_ci_php71_pgsql.yml @@ -26,6 +26,8 @@ jobs: image: postgres env: POSTGRES_PASSWORD: postgres + POSTGRES_USER: postgres + POSTGRES_DB: postgres # Set health checks to wait until postgres has started options: >- --health-cmd pg_isready @@ -141,7 +143,8 @@ jobs: sudo /etc/init.d/postgresql restart #$(PGPASSWORD="postgres"; psql -h 127.0.0.1 -p 5432 -U postgres -l -A) - psql -h 127.0.0.1 -p 5432 -U postgres -l -A + psql postgresql://postgres:postgres@127.0.0.1:5432 -l -A + #psql -h 127.0.0.1 -p 5432 -U postgres -l -A echo sudo pgloader mysql://root:password@127.0.0.1/travis postgresql://postgres:postgres@127.0.0.1:5432/travis sudo mkdir -p /tmp/pgloader diff --git a/.travis.yml b/.travis.yml index f1a3c3fb586..f8efc5ba613 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,6 +41,7 @@ env: global: # Set to true for very verbose output - DEBUG=false + #- PGPORT=5433 jobs: fast_finish: true @@ -96,10 +97,21 @@ before_install: fi - | - echo Install packages for PHP + echo Install pgsql if run is for pgsql if [ "$DB" = 'postgresql' ]; then - psql -U postgres -h 127.0.0.1 -c 'create database travis_ci_test;' - psql -U postgres -h 127.0.0.1 -c 'create database travis;' + echo "Check pgloader version" + pgloader --version + ps fauxww | grep postgres + ls /etc/postgresql/13/main/ + sudo cat /etc/postgresql/13/main/pg_hba.conf + sudo sed -i -e '/local.*peer/s/postgres/all/' -e 's/peer\|md5/trust/g' /etc/postgresql/13/main/pg_hba.conf + sudo cat /etc/postgresql/13/main/pg_hba.conf + + sudo service postgresql restart + + psql postgresql://postgres:postgres@127.0.0.1:5432 -l -A + #psql -U postgres -h 127.0.0.1 -c 'create database travis_ci_test;' + #psql -U postgres -h 127.0.0.1 -c 'create database travis;' fi install: @@ -204,14 +216,6 @@ before_script: echo "Database version" mysql --version | head - psql --version - if [ "$DB" = 'postgresql' ]; then - echo "Check pgloader version" - pgloader --version - ps fauxww | grep postgres - ls /etc/postgresql/13/main/ - sudo cat /etc/postgresql/11/main/pg_hba.conf - fi - echo - | echo "Setting up database"