Skip to content

Commit

Permalink
New CI job to run EndToEnd test suite with phpunit phar
Browse files Browse the repository at this point in the history
Running test with phpunit from version 4 to 9
  • Loading branch information
ilario-pierbattista committed Mar 21, 2021
1 parent 99bb823 commit e3a2701
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 24 deletions.
33 changes: 28 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,10 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
allow_fail: [false]
php: [5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4]
dependencies:
- "lowest"
- "highest"
include:
- php: 8
allow_fail: true
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -29,4 +25,31 @@ jobs:
dependency-versions: ${{ matrix.dependencies }}
- name: Run tests
run: vendor/bin/phpunit test
continue-on-error: ${{ matrix.allow_fail }}

phpunit-compatibility:
name: Test End to End with php ${{ matrix.php }}, phpunit ${{ matrix.phpunit }}
runs-on: ubuntu-latest
strategy:
matrix:
include:
- { phpunit: 9, php: 8.0 }
- { phpunit: 8, php: 7.4 }
- { phpunit: 7, php: 7.3 }
- { phpunit: 6, php: 7.2 }
- { phpunit: 5, php: 7.1 }
- { phpunit: 4, php: 5.6 }
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- name: Install dependencies
uses: ramsey/composer-install@v1
- name: Download phpunit phar
run: |
wget -O phpunit https://phar.phpunit.de/phpunit-${{ matrix.phpunit }}.phar
chmod +x phpunit
- name: Run tests
run: ./phpunit --testsuite EndToEnd
18 changes: 0 additions & 18 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,3 @@ jobs:
- name: Install dependencies
uses: "ramsey/composer-install@v1"
- run: ${{ matrix.script }}

phpunit-compatibility:
name: Check installability of phpunit ${{ matrix.phpunit }}
strategy:
matrix:
phpunit: [4, 5, 6, 7]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
- name: Check if phpunit ${{ matrix.phpunit }} can be installed
run: |
composer require --no-update phpunit/phpunit ~${{ matrix.phpunit }}
composer update --ignore-platform-reqs --dry-run
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
.php_cs.cache
composer.lock
docs/_build
.phpunit.result.cache
10 changes: 9 additions & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
<?xml version="1.0" encoding="UTF-8" ?>
<phpunit bootstrap="test/bootstrap.php" colors="true">
<phpunit
bootstrap="test/bootstrap.php"
colors="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/5.0/phpunit.xsd"
>
<testsuites>
<testsuite name="Full">
<directory>./test</directory>
</testsuite>
<testsuite name="Examples">
<directory>./examples</directory>
</testsuite>
<testsuite name="EndToEnd">
<file>./test/ExampleEnd2EndTest.php</file>
</testsuite>
</testsuites>
<php>
<ini name="display_errors" value="1" />
Expand Down

0 comments on commit e3a2701

Please sign in to comment.