From bb6b87a67946cadcefa853456d1dcb12bc09b8c2 Mon Sep 17 00:00:00 2001 From: smiley Date: Sun, 25 Aug 2024 19:45:05 +0200 Subject: [PATCH] :octocat: rung pgsql on CI --- .github/workflows/ci.yml | 41 +++++++++++++++------------------------- phpunit.xml.dist | 1 - 2 files changed, 15 insertions(+), 27 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4002449..8273416 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -102,24 +102,21 @@ jobs: - name: "Checkout" uses: actions/checkout@v4 - # pgsql is already installed on the runner, we just need to start the service - # https://www.cybertec-postgresql.com/en/postgresql-github-actions-continuous-integration/ -# - name: "Start PostgreSQL (Linux)" -# if: ${{ runner.os == 'Linux' }} -# # we also need to change the password for the default user under Linux to match the one under Windows -# run: | -# sudo systemctl start postgresql.service -# pg_isready -# sudo -u postgres psql --command="ALTER USER postgres PASSWORD 'root';" -# sudo -u postgres createdb --echo --owner=postgres dbtest -# -# - name: "Start PostgreSQL (Windows)" -# if: ${{ runner.os == 'Windows' }} -# run: | -# $pgService = Get-Service -Name postgresql* -# Set-Service -InputObject $pgService -Status running -StartupType automatic -# Start-Process -FilePath "$env:PGBIN\pg_isready" -Wait -PassThru -# & $env:PGBIN\createdb --echo --owner=postgres dbtest + - name: "Install SQLite (Linux)" + if: ${{ runner.os == 'Linux' }} + run: sudo apt-get -y install sqlite3 libsqlite3-dev + + - name: "Install SQLite (Windows)" + if: ${{ runner.os == 'Windows' }} + run: choco install sqlite + + - name: "Install Postgres" + uses: ikalnytskyi/action-setup-postgres@v6 + with: + username: postgres + password: root + database: dbtest + port: 5432 # - name: "Install MySQL" # uses: shogo82148/actions-setup-mysql@v1 @@ -130,14 +127,6 @@ jobs: # - name: "Create MySQL test database" # run: mysql --user="root" --host="127.0.0.1" -e "CREATE DATABASE dbtest character set UTF8mb4 collate utf8mb4_bin;" - - name: "Install SQLite (Linux)" - if: ${{ runner.os == 'Linux' }} - run: sudo apt-get -y install sqlite3 libsqlite3-dev - - - name: "Install SQLite (Windows)" - if: ${{ runner.os == 'Windows' }} - run: choco install sqlite - # - name: "Install Firebird (Linux)" # if: ${{ runner.os == 'Linux' }} # run: | diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 6f6e2a9..0c53580 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -25,7 +25,6 @@ firebird - pgsql mssql mysql