File tree Expand file tree Collapse file tree 5 files changed +35
-14
lines changed Expand file tree Collapse file tree 5 files changed +35
-14
lines changed Original file line number Diff line number Diff line change 1010 branches :
1111 - main
1212
13+ concurrency :
14+ group : ${{ github.workflow }}-${{ github.ref }}
15+ cancel-in-progress : ${{ github.ref != 'refs/heads/main' }}
16+
1317permissions :
1418 contents : read
1519
Original file line number Diff line number Diff line change 1010 branches :
1111 - main
1212
13+ concurrency :
14+ group : ${{ github.workflow }}-${{ github.ref }}
15+ cancel-in-progress : ${{ github.ref != 'refs/heads/main' }}
16+
1317permissions :
1418 contents : read
1519
8185 uses : shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # v2
8286 with :
8387 php-version : ${{ matrix.php }}
84- coverage : xdebug
88+ coverage : ${{ matrix.calculate-code-coverage == true && ' xdebug' || 'none' }}
8589 extensions : ctype, json, mbstring, pdo_pgsql
8690 tools : composer
8791
9397 uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
9498 with :
9599 path : vendor
96- key : ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
100+ key : ${{ runner.os }}-php-${{ matrix.php }}-pg-${{ matrix.postgres }}-${{ hashFiles('**/composer.lock') }}
97101 restore-keys : |
98- ${{ runner.os }}-php-
102+ ${{ runner.os }}-php-${{ matrix.php }}-pg-${{ matrix.postgres }}-
103+ ${{ runner.os }}-php-${{ matrix.php }}-
99104
100105 - name : Install dependencies
101106 run : composer install --prefer-dist --no-interaction --no-progress
@@ -125,7 +130,12 @@ jobs:
125130 PGPASSWORD=postgres psql -h localhost -U postgres -d postgres_doctrine_test -c "SELECT PostGIS_Version();"
126131
127132 - name : Run integration test suite
128- run : composer run-integration-tests
133+ run : |
134+ if [ "${{ matrix.calculate-code-coverage }}" = "true" ]; then
135+ XDEBUG_MODE=coverage composer run-integration-tests
136+ else
137+ composer run-integration-tests -- --no-coverage
138+ fi
129139 env :
130140 POSTGRES_HOST : localhost
131141 POSTGRES_PORT : 5432
Original file line number Diff line number Diff line change 1010 branches :
1111 - main
1212
13+ concurrency :
14+ group : ${{ github.workflow }}-${{ github.ref }}
15+ cancel-in-progress : ${{ github.ref != 'refs/heads/main' }}
16+
1317permissions :
1418 contents : read
1519
6367 uses : shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # v2
6468 with :
6569 php-version : ${{ matrix.php }}
66- coverage : xdebug
70+ coverage : ${{ matrix.calculate-code-coverage == true && ' xdebug' || 'none' }}
6771 extensions : ctype, json, mbstring
6872 tools : composer
6973
7276 uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
7377 with :
7478 path : vendor
75- key : ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
79+ key : ${{ runner.os }}-php-${{ matrix.php }}-orm-${{ matrix.doctrine-orm }}-lexer-${{ matrix.doctrine-lexer }}-${{ hashFiles('**/composer.lock') }}
7680 restore-keys : |
77- ${{ runner.os }}-php-
81+ ${{ runner.os }}-php-${{ matrix.php }}-orm-${{ matrix.doctrine-orm }}-lexer-${{ matrix.doctrine-lexer }}-
82+ ${{ runner.os }}-php-${{ matrix.php }}-
7883
7984 - name : Install Doctrine Lexer dependency
8085 run : |
@@ -105,7 +110,12 @@ jobs:
105110 continue-on-error : ${{ matrix.continue-on-error || false }}
106111
107112 - name : Run unit test suite
108- run : composer run-unit-tests
113+ run : |
114+ if [ "${{ matrix.calculate-code-coverage }}" = "true" ]; then
115+ XDEBUG_MODE=coverage composer run-unit-tests
116+ else
117+ composer run-unit-tests -- --no-coverage
118+ fi
109119
110120 - name : Upload coverage results to Coveralls
111121 if : matrix.calculate-code-coverage == true
Original file line number Diff line number Diff line change 88 tests :
99 override :
1010 - php-scrutinizer-run
11- - command : composer run-unit-tests
11+ - command : XDEBUG_MODE=coverage composer run-unit-tests
1212 coverage :
1313 file : var/logs/test-coverage/unit/clover.xml
1414 format : clover
Original file line number Diff line number Diff line change 7171 "phpstan" : [
7272 " phpstan analyse --configuration=./ci/phpstan/config.neon"
7373 ],
74- "phpunit" : [
75- " XDEBUG_MODE=coverage phpunit"
76- ],
7774 "phpunit:unit" : [
78- " @ phpunit --configuration=./ci/phpunit/config-unit.xml"
75+ " phpunit --configuration=./ci/phpunit/config-unit.xml"
7976 ],
8077 "phpunit:integration" : [
81- " @ phpunit --configuration=./ci/phpunit/config-integration.xml"
78+ " phpunit --configuration=./ci/phpunit/config-integration.xml"
8279 ],
8380 "rector" : [
8481 " rector --config=./ci/rector/config.php --ansi --no-progress-bar"
You can’t perform that action at this time.
0 commit comments