Skip to content

Commit 3adba34

Browse files
committed
ci(tests): fix phpunit run
1 parent 25bbe15 commit 3adba34

File tree

3 files changed

+21
-17
lines changed

3 files changed

+21
-17
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
strategy:
1717
matrix:
18-
php: [8.1]
18+
php: [8.1, 8.2, 8.3]
1919
steps:
2020
- uses: actions/[email protected]
2121
- uses: shivammathur/setup-php@v2
@@ -46,7 +46,7 @@ jobs:
4646
runs-on: ubuntu-latest
4747
strategy:
4848
matrix:
49-
php: [8.1]
49+
php: [8.1, 8.2, 8.3]
5050
steps:
5151
- uses: actions/[email protected]
5252
- uses: shivammathur/setup-php@v2
@@ -80,7 +80,7 @@ jobs:
8080
runs-on: ubuntu-latest
8181
strategy:
8282
matrix:
83-
php: [8.1, 8.2]
83+
php: [8.1, 8.2, 8.3]
8484
steps:
8585
- uses: actions/[email protected]
8686
- uses: shivammathur/setup-php@v2
@@ -98,7 +98,7 @@ jobs:
9898
runs-on: ubuntu-latest
9999
strategy:
100100
matrix:
101-
php: [8.1, 8.2]
101+
php: [8.1, 8.2, 8.3]
102102
steps:
103103
- uses: actions/[email protected]
104104
- uses: shivammathur/setup-php@v2
@@ -114,32 +114,35 @@ jobs:
114114
tests:
115115
runs-on: ubuntu-latest
116116

117+
strategy:
118+
matrix:
119+
php: [8.1, 8.2, 8.3]
120+
117121
steps:
118-
- name: Checkout Code
119-
uses: actions/checkout@v2
122+
- uses: actions/[email protected]
123+
124+
- uses: shivammathur/setup-php@v2
125+
with:
126+
php-version: ${{ matrix.php }}
127+
tools: composer:v2
128+
coverage: xdebug
129+
extensions: xdebug-beta
120130

121131
- name: Install composer and dependencies
122132
uses: php-actions/composer@v6
123133

124134
- name: PHPUnit Tests
125-
uses: php-actions/phpunit@v3
126-
env:
127-
XDEBUG_MODE: coverage
128-
with:
129-
bootstrap: vendor/autoload.php
130-
configuration: phpunit.xml
131-
php_extensions: xdebug
132-
args: tests --coverage-clover ./vendor/coverage.xml
135+
run: ./vendor/bin/phpunit --coverage-clover ./coverage.xml
133136

134137
- name: Upload to Codecov
135138
uses: codecov/codecov-action@v2
136139
with:
137140
token: ${{ secrets.CODE_COV_TOKEN }}
138-
files: ./vendor/coverage.xml
141+
files: ./coverage.xml
139142
verbose: true
140143

141144
- name: Publish Test Report
142145
uses: mikepenz/action-junit-report@v3
143146
if: success() || failure() # always run even if the previous step fails
144147
with:
145-
report_paths: './vendor/junit.xml'
148+
report_paths: './junit.xml'

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ composer.lock
44

55
# PHPUnit
66
.phpunit.result.cache
7+
junit.xml

phpunit.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
</source>
2020

2121
<logging>
22-
<junit outputFile="./vendor/junit.xml"/>
22+
<junit outputFile="junit.xml"/>
2323
</logging>
2424

2525
<coverage>

0 commit comments

Comments
 (0)