Skip to content

Commit

Permalink
Update CI for PHPUnit (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
tabuna authored Mar 14, 2024
1 parent e0605f8 commit a8e615b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v1
uses: actions/checkout@v4

- name: Cache dependencies
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.composer/cache/files
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
Expand All @@ -41,7 +41,7 @@ jobs:
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
coverage: xdebug
coverage: pcov

- name: Install dependencies
run: |
Expand All @@ -52,6 +52,6 @@ jobs:
run: vendor/bin/phpunit

- name: Codecov
uses: codecov/codecov-action@v1.0.5
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
},
"require-dev": {
"orchestra/testbench": "^8.0|^9.0",
"phpunit/php-code-coverage": "^10.0|^11.0"
"phpunit/phpunit": "^10.5|^11.0",
"phpunit/php-code-coverage": "^10.|^11.0"
},
"autoload": {
"psr-4": {
Expand Down
10 changes: 6 additions & 4 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" bootstrap="vendor/autoload.php"
colors="true" processIsolation="false" stopOnFailure="false" stopOnError="false"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd" cacheDirectory=".phpunit.cache"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.0/phpunit.xsd" cacheDirectory=".phpunit.cache"
backupStaticProperties="false">
<coverage>
<include>
<directory suffix=".php">./src</directory>
</include>
<report>
<clover outputFile="clover.xml"/>
</report>
Expand All @@ -28,4 +25,9 @@
<env name="QUEUE_DRIVER" value="sync"/>
</php>
<logging/>
<source>
<include>
<directory suffix=".php">./src</directory>
</include>
</source>
</phpunit>

0 comments on commit a8e615b

Please sign in to comment.