-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Allow PHP 8.0 * Updated PHPUnit config * Check PHP 8.0 * Remove PHP 7.1 from testing matrix
- Loading branch information
1 parent
17e669f
commit 89143e5
Showing
5 changed files
with
108 additions
and
62 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
name: "Tests" | ||
|
||
on: | ||
pull_request: null | ||
push: | ||
branches: | ||
- "3.x" | ||
|
||
jobs: | ||
phpunit: | ||
name: "PHPUnit" | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
include: | ||
- php-version: 7.4 | ||
symfony-version: 4.4.* | ||
- php-version: 8.0 | ||
symfony-version: 4.4.* | ||
- php-version: 7.4 | ||
symfony-version: 5.2.* | ||
- php-version: 8.0 | ||
symfony-version: 5.2.* | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: actions/checkout@v2 | ||
|
||
- name: "Setup PHP" | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
coverage: none | ||
php-version: ${{ matrix.php-version }} | ||
|
||
- name: "Install dependencies with composer" | ||
run: | | ||
composer require --no-update --dev symfony/symfony:${{ matrix.symfony-version }} | ||
composer update --no-interaction --no-progress --no-suggest | ||
- name: "Run tests with phpunit/phpunit" | ||
run: vendor/bin/phpunit | ||
|
||
codecov: | ||
name: "Code coverage" | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
include: | ||
- php-version: 8.0 | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: actions/checkout@v2 | ||
|
||
- name: "Setup PHP" | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
coverage: xdebug | ||
php-version: ${{ matrix.php-version }} | ||
|
||
- name: "Install dependencies with composer" | ||
run: composer update --no-interaction --no-progress --no-suggest | ||
|
||
- name: "Run tests with phpunit/phpunit" | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
run: | | ||
vendor/bin/phpunit --coverage-clover coverage.xml | ||
- name: "Upload coverage to Codecov" | ||
uses: codecov/codecov-action@v1 | ||
|
||
checkstyke: | ||
name: "Checkstyle" | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
include: | ||
- php-version: 8.0 | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: actions/checkout@v2 | ||
|
||
- name: "Setup PHP" | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
coverage: xdebug | ||
php-version: ${{ matrix.php-version }} | ||
|
||
- name: "Install dependencies with composer" | ||
run: composer update --no-interaction --no-progress --no-suggest | ||
|
||
- name: "Run checkstyle with squizlabs/php_codesniffer" | ||
run: vendor/bin/phpcs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
/.idea/ | ||
/vendor/ | ||
/.phpcs-cache | ||
/.phpunit.result.cache | ||
/composer.lock | ||
/docker-compose.yml | ||
/phpunit.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<phpunit backupGlobals="false" | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" | ||
backupGlobals="false" | ||
backupStaticAttributes="false" | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
processIsolation="false" | ||
stopOnFailure="false" | ||
colors="true" | ||
bootstrap="vendor/autoload.php" | ||
> | ||
|
||
bootstrap="vendor/autoload.php"> | ||
<testsuites> | ||
<testsuite name="YokaiEnumBundle Test Suite"> | ||
<directory>./tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
|
||
<filter> | ||
<whitelist> | ||
<coverage> | ||
<include> | ||
<directory>./src</directory> | ||
</whitelist> | ||
</filter> | ||
</include> | ||
</coverage> | ||
</phpunit> |