Skip to content

Commit d4c8723

Browse files
committed
ci: remove Windows, add all PHP 7.4-8.5, fix PHPUnit 9 compat
1 parent 7018dde commit d4c8723

3 files changed

Lines changed: 10 additions & 14 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,12 @@ on:
88

99
jobs:
1010
tests:
11-
name: PHP ${{ matrix.php }} - ${{ matrix.os }}
12-
runs-on: ${{ matrix.os }}
11+
name: PHP ${{ matrix.php }}
12+
runs-on: ubuntu-latest
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
php: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
17-
os: [ubuntu-latest]
18-
include:
19-
- php: '8.5'
20-
os: ubuntu-latest
16+
php: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
2117

2218
steps:
2319
- uses: actions/checkout@v4
@@ -33,10 +29,10 @@ jobs:
3329
run: composer install --prefer-dist --no-progress
3430

3531
- name: Run tests
36-
run: vendor/bin/phpunit --coverage-clover coverage.xml
32+
run: vendor/bin/phpunit --coverage-filter=src --coverage-clover=coverage.xml
3733

3834
- name: Upload coverage
39-
if: matrix.php == '8.3' && matrix.os == 'ubuntu-latest'
35+
if: matrix.php == '8.3'
4036
uses: codecov/codecov-action@v4
4137
with:
4238
file: coverage.xml

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/vendor/
22
/composer.lock
33
/.phpunit.cache/
4+
/.phpunit.result.cache
45
/coverage/
56
/.php-cs-fixer.cache
67
/qrcode.php

phpunit.xml.dist

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
3+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
44
bootstrap="vendor/autoload.php"
55
colors="true"
6-
cacheDirectory=".phpunit.cache"
76
executionOrder="depends,defects"
87
failOnRisky="true"
98
failOnWarning="true">
@@ -15,9 +14,9 @@
1514
<directory>tests/Integration</directory>
1615
</testsuite>
1716
</testsuites>
18-
<source>
17+
<coverage>
1918
<include>
20-
<directory>src</directory>
19+
<directory suffix=".php">src</directory>
2120
</include>
22-
</source>
21+
</coverage>
2322
</phpunit>

0 commit comments

Comments
 (0)