Skip to content

Commit

Permalink
fix CI for add-gh-actions branch (#14)
Browse files Browse the repository at this point in the history
* fix Java version

* fix step declaration

* fix tests

* remove useless PHPCsFixer rules

* remove useless step
  • Loading branch information
Jean-Beru authored Jan 20, 2023
1 parent 2df49b6 commit 7630253
Show file tree
Hide file tree
Showing 14 changed files with 705 additions and 731 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: intl, bcmath, curl, openssl, mbstring
extensions: intl, bcmath, curl, openssl, mbstring
ini-values: memory_limit=-1
tools: pecl, composer, php-cs-fixer
coverage: none
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:
with:
php-version: ${{ matrix.php }}
tools: pecl, composer
extensions: intl, bcmath, curl, openssl, mbstring
extensions: intl, bcmath, curl, openssl, mbstring
coverage: pcov
ini-values: memory_limit=-1
- name: Get composer cache directory
Expand All @@ -117,17 +117,21 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: nanasess/setup-chromedriver@v1
- name: Fix Java version # Use JDK8 due to https://github.com/SeleniumHQ/selenium/issues/4964
run: |
sudo apt-get install openjdk-8-jre
sudo update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
- name: Setup
run: |
export DISPLAY=:99
chromedriver --url-base=/wd/hub &
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional
export DISPLAY=:99
chromedriver --url-base=/wd/hub &
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: pecl, composer
extensions: intl, bcmath, curl, openssl, mbstring
extensions: intl, bcmath, curl, openssl, mbstring
coverage: pcov
ini-values: memory_limit=-1
- name: Get composer cache directory
Expand All @@ -143,10 +147,10 @@ jobs:
run: composer update --no-interaction --no-progress --ansi
- name: Run selenium
run: |
wget "https://selenium-release.storage.googleapis.com/3.9/selenium-server-standalone-3.9.1.jar" -O selenium.jar
java -jar selenium.jar &> /dev/null &
wget "https://selenium-release.storage.googleapis.com/3.9/selenium-server-standalone-3.9.1.jar" -O selenium.jar
java -jar selenium.jar &> /dev/null &
- name: Run php fixtures server
run: php -S localhost:8080 -t tests/fixtures/www &> /dev/null &
run: php -S localhost:8080 -t tests/fixtures/www &> /dev/null &
- name: Run behat tests (default)
run: ./bin/behat -fprogress --tags="~@user" --no-interaction --profile=default
- name: Run behat tests (symfony 2)
Expand Down
38 changes: 4 additions & 34 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,11 @@

declare(strict_types=1);

$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->exclude([
'src/Core/Bridge/Symfony/Maker/Resources/skeleton',
'tests/Fixtures/app/var',
'tests/Fixtures/Symfony/Maker',
])
->notPath('src/Symfony/Bundle/DependencyInjection/Configuration.php')
->notPath('src/Annotation/ApiFilter.php') // temporary
->notPath('src/Annotation/ApiProperty.php') // temporary
->notPath('src/Annotation/ApiResource.php') // temporary
->notPath('src/Annotation/ApiSubresource.php') // temporary
->notPath('tests/Fixtures/TestBundle/Entity/DummyPhp8.php') // temporary
->append([
'tests/Fixtures/app/console',
]);
$finder = PhpCsFixer\Finder::create()->in(__DIR__);

return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setRules([
'@DoctrineAnnotation' => true,
'@PHP71Migration' => true,
'@PHP71Migration:risky' => true,
'@PHPUnit60Migration:risky' => true,
Expand All @@ -33,13 +17,9 @@
],
'array_indentation' => true,
'compact_nullable_typehint' => true,
'doctrine_annotation_array_assignment' => [
'operator' => '=',
],
'doctrine_annotation_spaces' => [
'after_array_assignments_equals' => false,
'before_array_assignments_equals' => false,
],
'doctrine_annotation_array_assignment' => true,
'doctrine_annotation_braces' => true,
'doctrine_annotation_indentation' => true,
'explicit_indirect_variable' => true,
'fully_qualified_strict_types' => true,
'logical_operators' => true,
Expand Down Expand Up @@ -77,16 +57,6 @@
],
'sort_algorithm' => 'alpha',
],
'php_unit_method_casing' => [
'case' => 'camel_case',
],
'php_unit_set_up_tear_down_visibility' => true,
'php_unit_test_annotation' => [
'style' => 'prefix',
],
'phpdoc_add_missing_param_annotation' => [
'only_untyped' => true,
],
'phpdoc_no_alias_tag' => true,
'phpdoc_order' => true,
'phpdoc_trim_consecutive_blank_line_separation' => true,
Expand Down
Loading

0 comments on commit 7630253

Please sign in to comment.