-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
162 additions
and
115 deletions.
There are no files selected for viewing
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,110 @@ | ||
name: CI | ||
|
||
on: | ||
workflow_dispatch: ~ | ||
push: | ||
branches: | ||
- master | ||
pull_request: ~ | ||
|
||
jobs: | ||
|
||
lint: | ||
name: Lint | ||
runs-on: 'ubuntu-latest' | ||
timeout-minutes: 5 | ||
|
||
steps: | ||
- name: 'Checkout' | ||
uses: actions/checkout@v2 | ||
|
||
- name: 'Setup PHP' | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.1' | ||
|
||
- name: 'Install dependencies' | ||
run: make php-cs-fixer.phar | ||
|
||
- name: 'Check style' | ||
run: ./php-cs-fixer.phar fix --dry-run --no-interaction --diff | ||
|
||
test: | ||
name: ${{ matrix.name }} | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 8 | ||
continue-on-error: ${{ matrix.allow-failure == 1 }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
# Lowest deps | ||
- name: 'Test lowest deps [Linux, PHP 7.4]' | ||
os: 'ubuntu-latest' | ||
php: '7.4' | ||
symfony: '4.4.*@dev' | ||
composer-flags: '--prefer-lowest' | ||
allow-unstable: true | ||
|
||
# Most recent versions | ||
- name: 'Test Symfony 5.4 [Linux, PHP 8.0]' | ||
os: 'ubuntu-latest' | ||
php: '8.0' | ||
symfony: '5.4.*@dev' | ||
allow-unstable: true | ||
|
||
- name: 'Test Symfony 6.0 [Linux, PHP 8.1]' | ||
os: 'ubuntu-latest' | ||
php: '8.1' | ||
symfony: '6.0.*@dev' | ||
allow-unstable: true | ||
|
||
# Bleeding edge (unreleased dev versions where failures are allowed) | ||
- name: 'Test next Symfony [Linux, PHP 8.1] (allowed failure)' | ||
os: 'ubuntu-latest' | ||
php: '8.1' | ||
symfony: '6.1.*@dev' | ||
composer-flags: '--ignore-platform-req php' | ||
allow-unstable: true | ||
allow-failure: true | ||
|
||
steps: | ||
- name: 'Set git to use LF' | ||
run: | | ||
git config --global core.autocrlf false | ||
git config --global core.eol lf | ||
- name: 'Checkout' | ||
uses: actions/checkout@v2 | ||
|
||
- name: 'Setup PHP' | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: pdo_sqlite | ||
coverage: pcov | ||
tools: 'composer:v2,flex' | ||
|
||
- name: 'Get composer cache directory' | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: 'Cache dependencies' | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-${{ hashFiles('**/composer.json') }}-flags-${{ matrix.composer-flags }} | ||
restore-keys: ${{ runner.os }}-composer- | ||
|
||
- name: 'Allow unstable packages' | ||
run: composer config minimum-stability dev | ||
if: ${{ matrix.allow-unstable }} | ||
|
||
- name: 'Install dependencies' | ||
run: composer update --prefer-dist ${{ matrix.composer-flags }} --ansi | ||
env: | ||
SYMFONY_REQUIRE: "${{ matrix.symfony }}" | ||
|
||
- name: 'Run PHPUnit tests' | ||
run: vendor/bin/simple-phpunit --testdox --verbose ${{ matrix.code-coverage && '--coverage-text --coverage-clover build/logs/clover.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
/vendor | ||
composer.lock | ||
.php_cs.cache | ||
.php-cs-fixer.cache | ||
php-cs-fixer.phar | ||
.phpunit.result.cache |
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 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,5 @@ | ||
PHP_CS_FIXER_VERSION=v3.4.0 | ||
|
||
php-cs-fixer.phar: | ||
wget --no-verbose https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/${PHP_CS_FIXER_VERSION}/php-cs-fixer.phar | ||
chmod +x php-cs-fixer.phar |
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
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,33 +1,21 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<phpunit | ||
backupGlobals="false" | ||
backupStaticAttributes="false" | ||
colors="true" | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
processIsolation="false" | ||
stopOnFailure="false" | ||
bootstrap="vendor/autoload.php" | ||
> | ||
<php> | ||
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[direct]=0&max[self]=0&max[total]=9999&verbose=1" /> | ||
</php> | ||
<testsuites> | ||
<testsuite name="ElaoFormTranslation Test Suite"> | ||
<directory suffix="Test.php">./Tests/</directory> | ||
</testsuite> | ||
</testsuites> | ||
|
||
<filter> | ||
<whitelist> | ||
<directory>./</directory> | ||
<exclude> | ||
<directory>./Resources</directory> | ||
<directory>./Tests</directory> | ||
<directory>./vendor</directory> | ||
</exclude> | ||
</whitelist> | ||
</filter> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" backupStaticAttributes="false" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" bootstrap="vendor/autoload.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"> | ||
<coverage> | ||
<include> | ||
<directory>./</directory> | ||
</include> | ||
<exclude> | ||
<directory>./Resources</directory> | ||
<directory>./Tests</directory> | ||
<directory>./vendor</directory> | ||
</exclude> | ||
</coverage> | ||
<php> | ||
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[direct]=0&max[self]=0&max[total]=9999&verbose=1"/> | ||
</php> | ||
<testsuites> | ||
<testsuite name="ElaoFormTranslation Test Suite"> | ||
<directory suffix="Test.php">./Tests/</directory> | ||
</testsuite> | ||
</testsuites> | ||
</phpunit> |