Skip to content

Commit

Permalink
Support PHP 8.x versions
Browse files Browse the repository at this point in the history
  • Loading branch information
aik099 committed Jul 9, 2024
1 parent c7dcbad commit 742dafd
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 3 deletions.
26 changes: 23 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,27 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [ '5.6', '7.0', '7.1', '7.2', '7.3', '7.4']
include:
- php: '5.6'
phpunit_config: 'phpunit.xml.dist' # PHPUnit 5.7
- php: '7.0'
phpunit_config: 'phpunit.xml.dist' # PHPUnit 6.5
- php: '7.1'
phpunit_config: 'phpunit.xml.dist' # PHPUnit 7.5
- php: '7.2'
phpunit_config: 'phpunit.xml.dist' # PHPUnit 8.5
- php: '7.3'
phpunit_config: 'phpunit9.xml.dist' # PHPUnit 9.6
- php: '7.4'
phpunit_config: 'phpunit9.xml.dist' # PHPUnit 9.6
# - php: '8.0'
# phpunit_config: 'phpunit9.xml.dist' # PHPUnit 9.6
# - php: '8.1'
# phpunit_config: 'phpunit10.xml.dist' # PHPUnit 10.5
- php: '8.2'
phpunit_config: 'phpunit10.xml.dist' # PHPUnit 10.5
- php: '8.3'
phpunit_config: 'phpunit10.xml.dist' # PHPUnit 10.5

name: Tests (PHP ${{ matrix.php }})
steps:
Expand All @@ -31,12 +51,12 @@ jobs:
- name: Install Dependencies
uses: ramsey/composer-install@v3
with:
dependency-versions: "highest"
dependency-versions: "highest"

- name: Run Tests
run: |
mkdir -p build/logs
vendor/bin/phpunit --coverage-clover build/logs/clover.xml
vendor/bin/phpunit --configuration ${{ matrix.phpunit_config }} --coverage-clover build/logs/clover.xml
- name: Downloading Scrutinizer CI binary
run: wget https://scrutinizer-ci.com/ocular.phar
Expand Down
25 changes: 25 additions & 0 deletions phpunit10.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
beStrictAboutTestsThatDoNotTestAnything="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutChangesToGlobalState="true"
cacheDirectory=".phpunit.cache">
<testsuites>
<testsuite name="default">
<directory>tests</directory>
</testsuite>
</testsuites>

<php>
<server name="working_directory" value=".code-insight"/>
</php>

<source>
<include>
<directory>src</directory>
</include>
</source>
</phpunit>
25 changes: 25 additions & 0 deletions phpunit9.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
beStrictAboutTestsThatDoNotTestAnything="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutChangesToGlobalState="true"
verbose="true">
<testsuites>
<testsuite name="default">
<directory>tests</directory>
</testsuite>
</testsuites>

<php>
<server name="working_directory" value=".code-insight"/>
</php>

<coverage>
<include>
<directory>src</directory>
</include>
</coverage>
</phpunit>

0 comments on commit 742dafd

Please sign in to comment.