File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -27,15 +27,19 @@ jobs:
2727 - drupal : " ^10"
2828 php : " 8.2"
2929 experimental : false
30+ coverage : false
3031 - drupal : " ^11"
3132 php : " 8.3"
3233 experimental : false
34+ coverage : true
3335 - drupal : " ^11"
3436 php : " 8.4"
3537 experimental : false
38+ coverage : false
3639 - drupal : " ^11"
3740 php : " 8.5"
3841 experimental : true
42+ coverage : false
3943
4044 env :
4145 SIMPLETEST_BASE_URL : " http://127.0.0.1"
4953 php-version : " ${{ matrix.php }}"
5054 tools : composer:v2
5155 extensions : gd
56+ coverage : pcov
5257
5358 - name : Create Drupal project
5459 run : composer create-project drupal/recommended-project:${{ matrix.drupal }} drupal --no-interaction --prefer-dist
7580 chmod -R 777 drupal/web/sites/simpletest/browser_output
7681
7782 - name : Run PHPUnit
83+ if : ${{ !matrix.coverage }}
7884 run : |
7985 cd drupal/web
8086 ../vendor/bin/phpunit -c core modules/contrib/jsonapi_frontend/tests
87+
88+ - name : Run PHPUnit (coverage)
89+ if : ${{ matrix.coverage }}
90+ run : |
91+ cd drupal/web
92+ ../vendor/bin/phpunit -c core modules/contrib/jsonapi_frontend/tests \
93+ --coverage-clover "$GITHUB_WORKSPACE/coverage.xml" \
94+ --coverage-filter modules/contrib/jsonapi_frontend
95+
96+ - name : Upload coverage artifact
97+ if : ${{ matrix.coverage }}
98+ uses : actions/upload-artifact@v4
99+ with :
100+ name : coverage-jsonapi_frontend
101+ path : coverage.xml
102+ if-no-files-found : error
103+
104+ - name : Upload coverage to Codecov
105+ if : ${{ matrix.coverage }}
106+ continue-on-error : true
107+ uses : codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de
108+ with :
109+ files : coverage.xml
110+ flags : phpunit,drupal
111+ fail_ci_if_error : false
112+ verbose : true
You can’t perform that action at this time.
0 commit comments