Skip to content

Commit

Permalink
Fix CI (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
ausi authored Mar 20, 2022
1 parent 4ed3f8c commit 648e623
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 7 deletions.
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

0 comments on commit 648e623

Please sign in to comment.