Skip to content

Commit

Permalink
Ci: try to use conditional step
Browse files Browse the repository at this point in the history
  • Loading branch information
misantron committed Aug 17, 2023
1 parent f496c12 commit 6d8d485
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Expand Up @@ -63,7 +63,7 @@ jobs:
composer-options: --no-ansi --no-interaction --no-progress
- name: Set config
run: cp phpunit.xml.dist phpunit.xml
if: ${{ matrix.php-versions }} >= '8.0'
if: ${{ matrix.php-versions == '7.4' || matrix.php-versions == '8.0' }}
- name: Run PHPUnit
run: vendor/bin/phpunit --colors=always --config phpunit.xml
coverage:
Expand Down
36 changes: 36 additions & 0 deletions ci/phpunit/phpunit.96.xml
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.6/phpunit.xsd"
bootstrap="tests/bootstrap.php"
beStrictAboutCoversAnnotation="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTodoAnnotatedTests="true"
verbose="true"
colors="true">

<testsuites>
<testsuite name="all">
<directory>tests/</directory>
<exclude>tests/_files/*</exclude>
</testsuite>
<testsuite name="unit">
<directory>tests/</directory>
<exclude>tests/_files/*</exclude>
<exclude>tests/Operation/OperationsMySQLTest.php</exclude>
</testsuite>
</testsuites>

<php>
<env name="MYSQL_DB_HOST" value="127.0.0.1"/>
<env name="MYSQL_DB_PORT" value="3406"/>
<env name="MYSQL_DB_NAME" value="dbunit"/>
<env name="MYSQL_DB_USER" value="root"/>
<env name="MYSQL_DB_PASSWORD" value=""/>
</php>

<coverage>
<include>
<directory suffix=".php">src</directory>
</include>
</coverage>
</phpunit>

0 comments on commit 6d8d485

Please sign in to comment.