Skip to content

Commit a2edf8b

Browse files
no message
1 parent ca59157 commit a2edf8b

File tree

2 files changed

+20
-25
lines changed

2 files changed

+20
-25
lines changed

.github/workflows/integration-tests.yml

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
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: |

.github/workflows/unit-tests.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
name: "PHP ${{ matrix.php }} + Doctrine ORM ${{ matrix.doctrine-orm }} + Doctrine Lexer ${{ matrix.doctrine-lexer }}"
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
doctrine-lexer: ['2.1', '3.0', 'latest']
@@ -71,11 +71,16 @@ jobs:
7171
extensions: ctype, json, mbstring
7272
tools: composer
7373

74+
- name: Get composer cache directory
75+
id: composer-cache-dir
76+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
77+
7478
- name: Cache Composer packages
75-
id: composer-cache
7679
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
7780
with:
78-
path: vendor
81+
path: |
82+
${{ steps.composer-cache-dir.outputs.dir }}
83+
vendor
7984
key: ${{ runner.os }}-php-${{ matrix.php }}-orm-${{ matrix.doctrine-orm }}-lexer-${{ matrix.doctrine-lexer }}-${{ hashFiles('**/composer.lock') }}
8085
restore-keys: |
8186
${{ runner.os }}-php-${{ matrix.php }}-orm-${{ matrix.doctrine-orm }}-lexer-${{ matrix.doctrine-lexer }}-

0 commit comments

Comments
 (0)