Skip to content

Commit 177279a

Browse files
committed
+ job phpunit with xdebug to upload artifact clover.xml @ workflows/be_base.yml
* enable `opcache.jit` in `php.ini` @ actions/be/action.yml * replace git ref in permalinks of github file from commit to tag @ actions @ .github * enable `pathCoverage` @ be/phpunit.xml
1 parent 6eae08b commit 177279a

File tree

5 files changed

+31
-10
lines changed

5 files changed

+31
-10
lines changed

.github/actions/be/action.yml

+10-8
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,22 @@ runs:
1111
with:
1212
php-version: '8.3'
1313
tools: cs2pr
14-
# https://github.com/shivammathur/setup-php/blob/6d7209f44a25a59e904b1ee9f3b0c33ab2cd888d/README.md#jit-configuration
15-
coverage: none
16-
ini-values: opcache.enable_cli=1
14+
coverage: none # https://github.com/shivammathur/setup-php/blob/2.31.1/README.md#disable-coverage
15+
# https://github.com/shivammathur/setup-php/blob/2.31.1/README.md#jit-configuration
16+
ini-values: >
17+
opcache.enable_cli=1, opcache.memory_consumption=256,
18+
opcache.jit=tracing, opcache.jit_buffer_size=64M
1719
# https://github.com/shivammathur/setup-php/wiki/Php-extensions-loaded-on-windows-2022/aee619eb6d77e86b17a76d458316b41e58a3b677
1820
extensions: fileinfo # league/[email protected] requires ext-fileinfo but it's not enabled by default on windows
19-
env: # https://github.com/shivammathur/setup-php/blob/6d7209f44a25a59e904b1ee9f3b0c33ab2cd888d/README.md#force-update-setup
20-
update: 'true'
21-
# https://github.com/shivammathur/setup-php/blob/6d7209f44a25a59e904b1ee9f3b0c33ab2cd888d/README.md#problem-matchers
21+
env:
22+
update: 'true' # https://github.com/shivammathur/setup-php/blob/2.31.1/README.md#force-update-setup
23+
# https://github.com/shivammathur/setup-php/blob/2.31.1/README.md#problem-matchers
2224
- run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
2325
working-directory: be
2426
shell: bash
2527

26-
# https://github.com/shivammathur/setup-php/blob/6d7209f44a25a59e904b1ee9f3b0c33ab2cd888d/README.md#cache-composer-dependencies
27-
# https://github.com/actions/cache/blob/a2ed59d39b352305bdd2f628719a53b2cc4f9613/examples.md#php---composer
28+
# https://github.com/shivammathur/setup-php/blob/2.31.1/README.md#cache-composer-dependencies
29+
# https://github.com/actions/cache/blob/v4.0.2/examples.md#php---composer
2830
- id: get-composer-cache-dir
2931
run: echo "path=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
3032
working-directory: be

.github/actions/c#/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ runs:
1212
# cache: true
1313
# # https://github.com/actions/setup-node/issues/624#issuecomment-1328681525
1414
# cache-dependency-path: ${{ github.workspace }}/c#/*/packages.lock.json
15-
# in favor of https://github.com/actions/cache/blob/a2ed59d39b352305bdd2f628719a53b2cc4f9613/examples.md#c---nuget
15+
# in favor of https://github.com/actions/cache/blob/v4.0.2/examples.md#c---nuget
1616
# to allow saving cache even jobs failed
1717

1818
- id: cache-restore

.github/actions/fe/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ runs:
1313
# cache: yarn
1414
# # https://github.com/actions/setup-node/issues/624#issuecomment-1328681525
1515
# cache-dependency-path: ${{ github.workspace }}/fe/yarn.lock
16-
# in favor of https://github.com/actions/cache/blob/a2ed59d39b352305bdd2f628719a53b2cc4f9613/examples.md#node---yarn-2
16+
# in favor of https://github.com/actions/cache/blob/v4.0.2/examples.md#node---yarn-2
1717
# to allow saving cache even jobs failed
1818

1919
# https://github.com/actions/setup-node/issues/1027

.github/workflows/be_base.yml

+18
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,24 @@ defaults:
99
run:
1010
working-directory: be
1111
jobs:
12+
phpunit:
13+
runs-on: ${{ inputs.runs-on }}
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: ./.github/actions/be
17+
- uses: shivammathur/setup-php@v2
18+
with:
19+
ini-values: opcache.jit_buffer_size=0 # PHP Warning: JIT is incompatible with third party extensions that override zend_execute_ex(). JIT disabled.
20+
coverage: xdebug
21+
# https://github.com/shivammathur/setup-php/blob/2.31.1/README.md#problem-matchers
22+
- run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
23+
- run: ./vendor/bin/phpunit --coverage-clover clover.xml
24+
- uses: actions/upload-artifact@v4
25+
with:
26+
name: coverage-${{ inputs.runs-on }}-clover.xml
27+
path: be/clover.xml
28+
compression-level: 9
29+
1230
phpstan:
1331
runs-on: ${{ inputs.runs-on }}
1432
steps:

be/phpunit.xml

+1
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,5 @@
3131
<env name="SESSION_DRIVER" value="array" />
3232
<env name="TELESCOPE_ENABLED" value="false" />
3333
</php>
34+
<coverage pathCoverage="true" />
3435
</phpunit>

0 commit comments

Comments
 (0)