diff --git a/.github/RUNNING_TESTS.md b/.github/RUNNING_TESTS.md
index b053e2ca1..1534b0660 100644
--- a/.github/RUNNING_TESTS.md
+++ b/.github/RUNNING_TESTS.md
@@ -170,7 +170,7 @@ InvoicePlane v2 uses two PHPUnit configuration files:
### phpunit.xml
- Runs all Unit and Feature test suites
-- Uses SQLite in-memory database
+- Uses MariaDB/MySQL via `DB_*` values in `phpunit.xml` / `phpunit.smoke.xml` (overridable by process environment variables)
- Includes all test directories
### phpunit.smoke.xml
diff --git a/.github/actions/setup-php-composer/action.yml b/.github/actions/setup-php-composer/action.yml
index a4270eb5c..56aefd315 100644
--- a/.github/actions/setup-php-composer/action.yml
+++ b/.github/actions/setup-php-composer/action.yml
@@ -8,7 +8,7 @@ inputs:
php-extensions:
description: 'PHP extensions to install (comma-separated)'
required: false
- default: 'mbstring, xml, ctype, json, fileinfo, pdo, sqlite, mysql, bcmath'
+ default: 'mbstring, xml, ctype, json, fileinfo, pdo, pdo_mysql, bcmath'
composer-flags:
description: 'Flags appended to the composer install command (e.g., --no-dev --optimize-autoloader). Used only when composer-args is empty.'
required: false
diff --git a/.github/workflows/composer-update.yml b/.github/workflows/composer-update.yml
index ee73c8707..d74e0840c 100644
--- a/.github/workflows/composer-update.yml
+++ b/.github/workflows/composer-update.yml
@@ -36,6 +36,29 @@ jobs:
update-composer-dependencies:
runs-on: ubuntu-latest
+ services:
+ mysql:
+ image: mariadb:11
+ env:
+ MARIADB_ROOT_PASSWORD: root
+ MARIADB_ROOT_HOST: '%'
+ MARIADB_DATABASE: testing
+ ports:
+ - 3306:3306
+ options: >-
+ --health-cmd="healthcheck.sh --connect --innodb_initialized"
+ --health-interval=10s
+ --health-timeout=5s
+ --health-retries=5
+
+ env:
+ DB_CONNECTION: mysql
+ DB_HOST: 127.0.0.1
+ DB_PORT: 3306
+ DB_DATABASE: testing
+ DB_USERNAME: root
+ DB_PASSWORD: root
+
steps:
- name: Checkout code
uses: actions/checkout@v4
@@ -46,7 +69,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
- extensions: mbstring, xml, ctype, json, fileinfo, pdo, sqlite, mysql, bcmath
+ extensions: mbstring, xml, ctype, json, fileinfo, pdo, pdo_mysql, bcmath
coverage: none
- name: Repair Composer install
diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml
index 96d83721c..40868fef4 100644
--- a/.github/workflows/phpunit.yml
+++ b/.github/workflows/phpunit.yml
@@ -14,8 +14,8 @@ jobs:
mariadb:
image: mariadb:10.11
env:
- MYSQL_DATABASE: invoiceplane_test
MYSQL_ROOT_PASSWORD: root
+ MYSQL_DATABASE: invoiceplane_test
ports:
- 3306:3306
options: >-
diff --git a/.github/workflows/quickstart.yml b/.github/workflows/quickstart.yml
index 55678b749..dbac2d03d 100644
--- a/.github/workflows/quickstart.yml
+++ b/.github/workflows/quickstart.yml
@@ -14,8 +14,8 @@ jobs:
mariadb:
image: mariadb:10.11
env:
- MYSQL_DATABASE: invoiceplane_test
MYSQL_ROOT_PASSWORD: root
+ MYSQL_DATABASE: invoiceplane_test
ports:
- 3306:3306
options: >-
diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml
index 6287e4d9d..089f6b4e7 100644
--- a/.github/workflows/setup.yml
+++ b/.github/workflows/setup.yml
@@ -62,14 +62,15 @@ jobs:
services:
mysql:
- image: mariadb:10.6
+ image: mariadb:11
env:
- MYSQL_DATABASE: ivplv2
- MYSQL_ROOT_PASSWORD: root
+ MARIADB_DATABASE: ivplv2
+ MARIADB_ROOT_PASSWORD: root
+ MARIADB_ROOT_HOST: '%'
ports:
- 3306:3306
options: >-
- --health-cmd="mysqladmin ping"
+ --health-cmd="healthcheck.sh --connect --innodb_initialized"
--health-interval=10s
--health-timeout=5s
--health-retries=5
@@ -90,7 +91,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
- extensions: mbstring, xml, json, pdo, mysql
+ extensions: mbstring, xml, json, pdo, pdo_mysql
coverage: none
- name: Set up Node.js
diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml
index e5d9f5e8f..44562920d 100644
--- a/.github/workflows/smoke.yml
+++ b/.github/workflows/smoke.yml
@@ -23,8 +23,8 @@ jobs:
mariadb:
image: mariadb:10.11
env:
- MYSQL_DATABASE: invoiceplane_test
MYSQL_ROOT_PASSWORD: root
+ MYSQL_DATABASE: invoiceplane_test
ports:
- 3306:3306
options: >-
@@ -50,7 +50,7 @@ jobs:
uses: ./.github/actions/setup-php-composer
with:
php-version: '8.4'
- php-extensions: 'mbstring, xml, ctype, json, fileinfo, pdo, pdo_mysql, pdo_sqlite, sqlite, bcmath'
+ php-extensions: 'mbstring, xml, ctype, json, fileinfo, pdo, pdo_mysql, bcmath'
composer-flags: '--prefer-dist --no-interaction'
- name: Prepare Laravel environment
diff --git a/.github/workflows/yarn-update.yml b/.github/workflows/yarn-update.yml
index 72bdd8b85..8b044a2ee 100644
--- a/.github/workflows/yarn-update.yml
+++ b/.github/workflows/yarn-update.yml
@@ -52,7 +52,7 @@ jobs:
uses: ./.github/actions/setup-php-composer
with:
php-version: '8.4'
- php-extensions: 'mbstring, xml, ctype, json, fileinfo, pdo, pdo_sqlite, pdo_mysql'
+ php-extensions: 'mbstring, xml, ctype, json, fileinfo, pdo, pdo_mysql'
- name: Check for package-lock.json conflicts
id: lockfile-check
diff --git a/phpunit.smoke.xml b/phpunit.smoke.xml
index c2788bb95..a794f2dce 100644
--- a/phpunit.smoke.xml
+++ b/phpunit.smoke.xml
@@ -29,8 +29,12 @@
-
-
+
+
+
+
+
+
diff --git a/phpunit.xml b/phpunit.xml
index c52013c61..fdc7bcec2 100644
--- a/phpunit.xml
+++ b/phpunit.xml
@@ -26,8 +26,12 @@
-
-
+
+
+
+
+
+