Skip to content

Commit

Permalink
Fix the CI
Browse files Browse the repository at this point in the history
  • Loading branch information
lyrixx committed May 15, 2023
1 parent be9eeb3 commit fefd3a7
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 103 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,18 @@ jobs:
- name: Install Dependencies
run: docker-compose run --rm --user=app frontend composer install

- name: Install Assets
run: docker-compose run --user=app --rm frontend yarn

- name: Build Assets
run: docker-compose run --user=app --rm frontend yarn build

- name: Create Database
run: docker-compose run --rm --user=app frontend bin/db --env=test

- name: Load Fixtures
run: docker-compose run --rm --user=app frontend bin/console doctrine:fixtures:load --env=test --no-interaction

- name: Execute tests
run: docker-compose run --rm --user=app frontend vendor/bin/simple-phpunit

Expand All @@ -50,7 +59,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Install missing extensions from the docker image
run: docker run --rm -v `pwd`:/app --workdir /app composer/composer composer require symfony/polyfill-intl-normalizer symfony/polyfill-intl-icu --ignore-platform-reqs

- name: PHPStan
uses: docker://oskarstark/phpstan-ga
env:
REQUIRE_DEV: true
CHECK_PLATFORM_REQUIREMENTS: false
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,13 @@
"replace": {
"symfony/polyfill-ctype": "*",
"symfony/polyfill-iconv": "*",
"symfony/polyfill-mbstring": "*",
"symfony/polyfill-php72": "*",
"symfony/polyfill-php73": "*",
"symfony/polyfill-php74": "*",
"symfony/polyfill-php80": "*",
"symfony/polyfill-php81": "*"
"symfony/polyfill-php81": "*",
"symfony/polyfill-php82": "*"
},
"conflict": {
"symfony/symfony": "*"
Expand Down
110 changes: 12 additions & 98 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/DataFixtures/AppFixtures.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class AppFixtures extends Fixture
public function load(ObjectManager $manager): void
{
$qotd = new Qotd(
new \DateTimeImmutable(),
new \DateTimeImmutable('2023-05-12'),
'https://example.com',
<<<'EOTXT'
Hello
Expand Down Expand Up @@ -55,7 +55,7 @@ public function load(ObjectManager $manager): void

for ($i = 1; $i < 1000; ++$i) {
$qotd = new Qotd(
new \DateTimeImmutable("now -{$i} days"),
new \DateTimeImmutable("2023-05-12 -{$i} days"),
$faker->url(),
$faker->paragraph(3),
$faker->email(),
Expand All @@ -67,7 +67,7 @@ public function load(ObjectManager $manager): void
// Add a gap between the first and the seconde QOTD
// to test the SQL queries about the stats
$qotd = new Qotd(
new \DateTimeImmutable('now -1500 days'),
new \DateTimeImmutable('2023-05-12 -1500 days'),
'https://example.com',
'This is a very old QOTD',
'[email protected]',
Expand Down
2 changes: 1 addition & 1 deletion src/Doctrine/EventListener/SchemaListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function onSchemaColumnDefinition(SchemaColumnDefinitionEventArgs $eventA
public function onSchemaIndexDefinition(SchemaIndexDefinitionEventArgs $eventArgs): void
{
if ('qotd' === $eventArgs->getTable()
&& \in_array($eventArgs->getTableIndex()['name'], ['qotd_message_trigram' , 'qotd_message_ts'], true)
&& \in_array($eventArgs->getTableIndex()['name'], ['qotd_message_trigram', 'qotd_message_ts'], true)
) {
$eventArgs->preventDefault();
}
Expand Down

0 comments on commit fefd3a7

Please sign in to comment.