Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CI #27

Merged
merged 1 commit into from
Mar 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 31 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
php-version: 8.1
extensions: intl, mbstring, pcre
tools: prestissimo
coverage: none
Expand All @@ -46,7 +46,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
php-version: 8.1
extensions: intl, mbstring, pcre
tools: prestissimo
coverage: none
Expand All @@ -71,7 +71,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [7.1, 7.2, 7.3, 7.4, 8.0]
php: [7.1, 7.2, 7.3, 7.4, 8.0, 8.1]
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -92,6 +92,29 @@ jobs:
- name: Run the unit tests
run: vendor/bin/phpunit --colors=always

php82:
name: PHP 8.2
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
extensions: intl, mbstring, pcre
tools: prestissimo
coverage: none

- name: Checkout
uses: actions/checkout@v2

- name: Install the dependencies
run: |
composer remove --dev --no-update contao/* phpstan/* psalm/* slam/* vimeo/*
composer install --no-interaction --no-suggest --ignore-platform-req=php

- name: Run the unit tests
run: vendor/bin/phpunit --colors=always

prefer-lowest:
name: Prefer Lowest
runs-on: ubuntu-latest
Expand Down Expand Up @@ -164,11 +187,15 @@ jobs:
windows:
name: Windows
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
php: [7.1, 7.2, 7.3, 7.4, 8.0, 8.1]
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
php-version: ${{ matrix.php }}
extensions: intl, mbstring, pcre
ini-values: memory_limit=1G
tools: prestissimo
Expand Down
5 changes: 5 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,10 @@
"unit-tests": [
"vendor/bin/phpunit --colors=always"
]
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}
2 changes: 2 additions & 0 deletions ecs.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use PhpCsFixer\Fixer\Comment\HeaderCommentFixer;
use PhpCsFixer\Fixer\ControlStructure\YodaStyleFixer;
use PhpCsFixer\Fixer\FunctionNotation\UseArrowFunctionsFixer;
use PhpCsFixer\Fixer\Operator\NewWithBracesFixer;
use PhpCsFixer\Fixer\PhpUnit\PhpUnitExpectationFixer;
use SlevomatCodingStandard\Sniffs\Variables\UselessVariableSniff;
Expand All @@ -20,6 +21,7 @@
NewWithBracesFixer::class => null,
UselessVariableSniff::class => null,
PhpUnitExpectationFixer::class => null,
UseArrowFunctionsFixer::class,
]);

$services = $containerConfigurator->services();
Expand Down
4 changes: 1 addition & 3 deletions tests/SlugOptionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,7 @@ public function testAddTransformThrows($transform, string $expectedException): v
{
$options = new SlugOptions(['transforms' => []]);

if ($expectedException) {
$this->expectException($expectedException);
}
$this->expectException($expectedException);

$this->assertSame([$transform], $options->addTransform($transform)->getTransforms());
}
Expand Down