Skip to content

Commit 4942874

Browse files
committed
Fix coverage
1 parent 9a950e5 commit 4942874

4 files changed

Lines changed: 49 additions & 40 deletions

File tree

.github/workflows/php.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,10 @@ jobs:
4444
# https://github.com/shivammathur/setup-php
4545
uses: shivammathur/setup-php@v2
4646
with:
47-
php-version: '8.0'
47+
# Should be the higest supported version, so we can use the newest tools
48+
php-version: '8.2'
4849
tools: composer:v2
49-
extensions: mbstring, xml
50+
extensions: ctype, date, dom, hash, intl, json, mbstring, mysql, openssl, pcre, pdo, pdo_sqlite, spl, xml
5051

5152
- name: Setup problem matchers for PHP
5253
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
@@ -105,8 +106,9 @@ jobs:
105106
# https://github.com/shivammathur/setup-php
106107
uses: shivammathur/setup-php@v2
107108
with:
109+
# Should be the lowest supported version
108110
php-version: '8.0'
109-
extensions: mbstring, xml
111+
extensions: ctype, date, dom, hash, intl, json, mbstring, mysql, openssl, pcre, pdo, pdo_sqlite, spl, xml
110112
tools: composer:v2
111113
coverage: none
112114

@@ -153,7 +155,7 @@ jobs:
153155
uses: shivammathur/setup-php@v2
154156
with:
155157
php-version: ${{ matrix.php-versions }}
156-
extensions: intl, mbstring, mysql, pdo, pdo_sqlite, xml
158+
extensions: ctype, date, dom, hash, intl, json, mbstring, mysql, openssl, pcre, pdo, pdo_sqlite, spl, xml
157159
tools: composer:v2
158160
ini-values: error_reporting=E_ALL
159161
coverage: xdebug
@@ -185,19 +187,19 @@ jobs:
185187
run: composer install --no-progress --prefer-dist --optimize-autoloader
186188

187189
- name: Run unit tests with coverage
188-
if: ${{ matrix.php-versions == '8.1' }}
190+
if: ${{ matrix.php-versions == '8.2' }}
189191
run: vendor/bin/phpunit
190192

191193
- name: Run unit tests (no coverage)
192-
if: ${{ matrix.php-versions != '8.1' }}
194+
if: ${{ matrix.php-versions != '8.2' }}
193195
run: vendor/bin/phpunit --no-coverage
194196

195197
- name: Save coverage data
196-
if: ${{ matrix.php-versions == '8.1' }}
198+
if: ${{ matrix.php-versions == '8.2' }}
197199
uses: actions/upload-artifact@v3
198200
with:
199201
name: coverage-data
200-
path: ${{ github.workspace }}/build
202+
path: ${{ github.workspace }}
201203

202204
unit-tests-windows:
203205
name: "Syntax and unit tests, PHP ${{ matrix.php-versions }}, ${{ matrix.operating-system }}"
@@ -215,7 +217,7 @@ jobs:
215217
uses: shivammathur/setup-php@v2
216218
with:
217219
php-version: ${{ matrix.php-versions }}
218-
extensions: intl, mbstring, mysql, pdo, pdo_sqlite, xml
220+
extensions: ctype, dom, date, hash, intl, json, mbstring, mysql, openssl, pcre, pdo, pdo_sqlite, spl, xml
219221
tools: composer:v2
220222
ini-values: error_reporting=E_ALL
221223
coverage: none
@@ -257,7 +259,7 @@ jobs:
257259
- uses: actions/download-artifact@v3
258260
with:
259261
name: coverage-data
260-
path: ${{ github.workspace }}/build
262+
path: ${{ github.workspace }}
261263

262264
- name: Codecov
263265
uses: codecov/codecov-action@v3

codecov.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ coverage:
66
default:
77
target: 0%
88
threshold: 2%
9-
patch: false
9+
patch: off
1010
comment:
1111
layout: "diff"
1212
behavior: once
1313
require_changes: true
14-
require_base: false
15-
require_head: true
14+
require_base: no
15+
require_head: yes
1616
branches: null
1717
github_checks:
1818
annotations: false

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@
5353
"ext-mbstring": "*",
5454
"ext-openssl": "*",
5555
"ext-pcre": "*",
56-
"ext-SPL": "*",
57-
"ext-zlib": "*",
56+
"ext-spl": "*",
57+
"ext-xml": "*",
5858

5959
"composer/composer": "^2.3",
6060
"gettext/gettext": "^5.6.1",

composer.lock

Lines changed: 32 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)