Skip to content

Commit

Permalink
ci(tests): fix phpunit run
Browse files Browse the repository at this point in the history
  • Loading branch information
zlodes committed Apr 21, 2024
1 parent 25bbe15 commit 3adba34
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 17 deletions.
35 changes: 19 additions & 16 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php: [8.1]
php: [8.1, 8.2, 8.3]
steps:
- uses: actions/checkout@v3.3.0
- uses: shivammathur/setup-php@v2
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php: [8.1]
php: [8.1, 8.2, 8.3]
steps:
- uses: actions/checkout@v3.3.0
- uses: shivammathur/setup-php@v2
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php: [8.1, 8.2]
php: [8.1, 8.2, 8.3]
steps:
- uses: actions/checkout@v3.3.0
- uses: shivammathur/setup-php@v2
Expand All @@ -98,7 +98,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php: [8.1, 8.2]
php: [8.1, 8.2, 8.3]
steps:
- uses: actions/checkout@v3.3.0
- uses: shivammathur/setup-php@v2
Expand All @@ -114,32 +114,35 @@ jobs:
tests:
runs-on: ubuntu-latest

strategy:
matrix:
php: [8.1, 8.2, 8.3]

steps:
- name: Checkout Code
uses: actions/checkout@v2
- uses: actions/checkout@v3.3.0

- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
coverage: xdebug
extensions: xdebug-beta

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

- name: PHPUnit Tests
uses: php-actions/phpunit@v3
env:
XDEBUG_MODE: coverage
with:
bootstrap: vendor/autoload.php
configuration: phpunit.xml
php_extensions: xdebug
args: tests --coverage-clover ./vendor/coverage.xml
run: ./vendor/bin/phpunit --coverage-clover ./coverage.xml

- name: Upload to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODE_COV_TOKEN }}
files: ./vendor/coverage.xml
files: ./coverage.xml
verbose: true

- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
if: success() || failure() # always run even if the previous step fails
with:
report_paths: './vendor/junit.xml'
report_paths: './junit.xml'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ composer.lock

# PHPUnit
.phpunit.result.cache
junit.xml
2 changes: 1 addition & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</source>

<logging>
<junit outputFile="./vendor/junit.xml"/>
<junit outputFile="junit.xml"/>
</logging>

<coverage>
Expand Down

0 comments on commit 3adba34

Please sign in to comment.