4141 name : " PostgreSQL ${{ matrix.postgres }} + PostGIS ${{ matrix.postgis }} + PHP ${{ matrix.php }}"
4242
4343 strategy :
44- fail-fast : false
44+ fail-fast : ${{ github.event_name == 'pull_request' }}
4545 matrix :
4646 php : ['8.1', '8.2', '8.3', '8.4', '8.5']
4747 postgis : ['3.4', '3.5', '3.6']
@@ -92,15 +92,20 @@ jobs:
9292 - name : Validate composer.json and composer.lock
9393 run : composer validate --strict
9494
95+ - name : Get composer cache directory
96+ id : composer-cache-dir
97+ run : echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
98+
9599 - name : Cache Composer packages
96- id : composer-cache
97100 uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
98101 with :
99- path : vendor
100- key : ${{ runner.os }}-php-${{ matrix.php }}-pg-${{ matrix.postgres }}-${{ hashFiles('**/composer.lock') }}
102+ path : |
103+ ${{ steps.composer-cache-dir.outputs.dir }}
104+ vendor
105+ key : ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }}
101106 restore-keys : |
102- ${{ runner.os }}-php-${{ matrix.php }}-pg-${{ matrix.postgres }} -
103- ${{ runner.os }}-php-${{ matrix.php }} -
107+ ${{ runner.os }}-php-${{ matrix.php }}-composer -
108+ ${{ runner.os }}-composer -
104109
105110 - name : Install dependencies
106111 run : composer install --prefer-dist --no-interaction --no-progress
@@ -112,22 +117,7 @@ jobs:
112117
113118 - name : Verify PostgreSQL connection and setup
114119 run : |
115- echo "Checking PostgreSQL version:"
116- PGPASSWORD=postgres psql -h localhost -U postgres -d postgres_doctrine_test -c "SELECT version();"
117-
118- echo "\nChecking PostgreSQL configuration:"
119- PGPASSWORD=postgres psql -h localhost -U postgres -d postgres_doctrine_test -c "SHOW server_version;"
120- PGPASSWORD=postgres psql -h localhost -U postgres -d postgres_doctrine_test -c "SHOW max_connections;"
121- PGPASSWORD=postgres psql -h localhost -U postgres -d postgres_doctrine_test -c "SHOW shared_buffers;"
122-
123- echo "\nCreating test schema:"
124- PGPASSWORD=postgres psql -h localhost -U postgres -d postgres_doctrine_test -c "CREATE SCHEMA IF NOT EXISTS test;"
125-
126- echo "\nListing available PostgreSQL extensions:"
127- PGPASSWORD=postgres psql -h localhost -U postgres -d postgres_doctrine_test -c "SELECT * FROM pg_available_extensions;"
128-
129- echo "\nVerifying PostGIS installation:"
130- PGPASSWORD=postgres psql -h localhost -U postgres -d postgres_doctrine_test -c "SELECT PostGIS_Version();"
120+ PGPASSWORD=postgres psql -h localhost -U postgres -d postgres_doctrine_test -c "CREATE SCHEMA IF NOT EXISTS test; SELECT PostGIS_Version();"
131121
132122 - name : Run integration test suite
133123 run : |
0 commit comments