Skip to content

Commit

Permalink
Try fixing integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tontonsb committed May 27, 2024
1 parent f92b47b commit 9ec903d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ jobs:
env:
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: yes
MARIADB_DATABASE: sfa
MARIADB_USER: sfa
MARIADB_PASSWORD: sfa
ports:
- 3306:3306
options: --health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=10s --health-timeout=5s --health-retries=3
Expand All @@ -63,16 +61,14 @@ jobs:
mysql-test:
runs-on: ubuntu-latest

name: Test with Mysql
name: Test with MySQL

services:
mysql:
image: mysql:8
env:
MYSQL_ROOT_PASSWORD: yes
MYSQL_DATABASE: sfa
MYSQL_USER: sfa
MYSQL_PASSWORD: sfa
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
Expand Down Expand Up @@ -102,6 +98,7 @@ jobs:
POSTGRES_PASSWORD: sfa
ports:
- 5432:5432
options: --health-cmd=pg_isready --health-interval=10s --health-timeout=5s --health-retries=3

steps:
- name: Checkout code
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/MariaDB/PDOTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ protected function setUp(): void

$dsn = "mysql:host=localhost;port=3306;dbname=sfa;";

$this->pdo = new PDO($dsn, 'sfa', 'sfa', [
$this->pdo = new PDO($dsn, options: [
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
]);
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/MySQL/PDOTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ protected function setUp(): void

$dsn = "mysql:host=localhost;port=3306;dbname=sfa;";

$this->pdo = new PDO($dsn, 'sfa', 'sfa', [
$this->pdo = new PDO($dsn, options: [
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
]);
Expand Down

0 comments on commit 9ec903d

Please sign in to comment.