Skip to content

Commit

Permalink
fix: ci error
Browse files Browse the repository at this point in the history
  • Loading branch information
Gwemox authored and x86demon committed Apr 24, 2024
1 parent 540d824 commit 07e09b5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 17 deletions.
16 changes: 5 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,19 @@ name: CI
on: [push, pull_request]

jobs:
build:
test:
runs-on: ubuntu-latest
strategy:
matrix:
php: [8.1]
db_image_name: [mysql, mariadb, percona, postgres]
db_image_name: [mysql, percona, postgres]
include:
- db_image_name: mysql
db_image_version: 8
db: mysql
vars: '-e MYSQL_PASSWORD=travis -e MYSQL_DATABASE=doctrine_extensions_tests -e MYSQL_USER=travis -e MYSQL_ROOT_PASSWORD=travis'
db_port: 3306
health: '--health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=10s --health-retries=10'
- db_image_name: mariadb
db_image_version: 11
db: mysql
vars: '-e MYSQL_PASSWORD=travis -e MYSQL_DATABASE=doctrine_extensions_tests -e MYSQL_USER=travis -e MYSQL_ROOT_PASSWORD=travis'
db_port: 3306
health: '--health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=10s --health-retries=10'
- db_image_name: percona
db_image_version: 8
db: mysql
Expand All @@ -30,16 +24,16 @@ jobs:
health: '--health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=10s --health-retries=10'
- db_image_name: postgres
db_image_version: 15
db: mysql
db: pgsql
vars: '-e POSTGRES_DB=doctrine_extensions_tests -e POSTGRES_USER=travis -e POSTGRES_PASSWORD=travis'
health: '--health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5'
db_port: 5432

services:
database:
image: ${{ matrix.db_image }}
image: ${{ matrix.db_image_name }}:${{ matrix.db_image_version }}
ports:
- ${{ matrix.db_port }}:{{ matrix.db_port }}
- ${{ matrix.db_port }}:${{ matrix.db_port }}
options: >-
${{ matrix.vars }}
${{ matrix.health }}
Expand Down
7 changes: 5 additions & 2 deletions src/Oro/ORM/Query/AST/FunctionFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ class FunctionFactory
*
* @throws QueryException
*/
public static function create(AbstractPlatform $platform, string $functionName, array $parameters): PlatformFunctionNode
{
public static function create(
AbstractPlatform $platform,
string $functionName,
array $parameters
): PlatformFunctionNode {
if ($platform instanceof PostgreSQLPlatform) {
$platformName = 'postgresql';
} elseif ($platform instanceof MySQLPlatform) {
Expand Down
4 changes: 2 additions & 2 deletions tests/config/mysql.phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" colors="false" stopOnFailure="false" bootstrap="../bootstrap.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.3/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
<php>
<var name="db_type" value="pdo_mysql"/>
<var name="db_host" value="database"/>
<var name="db_host" value="127.0.0.1"/>
<var name="db_username" value="travis"/>
<var name="db_password" value="travis"/>
<var name="db_name" value="doctrine_extensions_tests"/>
<var name="db_port" value="33060"/>
<var name="db_port" value="3306"/>
</php>
<testsuites>
<testsuite name="Oro Doctrine Extensions Test Suite">
Expand Down
4 changes: 2 additions & 2 deletions tests/config/pgsql.phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" colors="false" stopOnFailure="false" bootstrap="../bootstrap.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.3/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
<php>
<var name="db_type" value="pdo_pgsql"/>
<var name="db_host" value="database"/>
<var name="db_host" value="localhost"/>
<var name="db_username" value="travis"/>
<var name="db_password" value="travis"/>
<var name="db_name" value="doctrine_extensions_tests"/>
<var name="db_port" value="54320"/>
<var name="db_port" value="5432"/>
</php>
<testsuites>
<testsuite name="Oro Doctrine Extensions Test Suite">
Expand Down

0 comments on commit 07e09b5

Please sign in to comment.