Skip to content

Commit

Permalink
PHP 8: add official support (#17)
Browse files Browse the repository at this point in the history
* composer.json: add PHP 8 support

* Test on PHP 7 and PHP 8
  • Loading branch information
davidrans authored Apr 27, 2021
1 parent 6a3283f commit 97a0905
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 8 deletions.
25 changes: 19 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,24 @@ on: [push]
jobs:
build-test:
runs-on: ubuntu-latest


strategy:
matrix:
php-versions: ['7.4', '8.0']
name: PHP ${{ matrix.php-versions }} Test

steps:
- uses: actions/checkout@v2
- uses: php-actions/composer@v1
- name: PHPUnit Tests
uses: php-actions/phpunit@v9
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
configuration: ./phpunit.xml
php-version: ${{ matrix.php-versions }}
tools: composer:v2, phpunit:v9

- name: Install Dependencies
run: composer install

- name: PHPUnit Tests
run: vendor/bin/phpunit
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}
],
"require": {
"php": "^7.3",
"php": "^7.3 || ^8.0 ",
"ext-json": "*",
"ext-curl": "*",
"psr/http-message": "^1.0",
Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" colors="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<testsuites>
<testsuite name="main">
<directory phpVersion="7.3.0" phpVersionOperator="&gt;=" suffix="Test.php">tests</directory>
<directory suffix="Test.php">tests</directory>
<exclude>tests/FronteggApiTest.php</exclude>
</testsuite>
</testsuites>
Expand Down

0 comments on commit 97a0905

Please sign in to comment.