Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/RUNNING_TESTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/setup-php-composer/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
25 changes: 24 additions & 1 deletion .github/workflows/composer-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: >-
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/quickstart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: >-
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: >-
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/yarn-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions phpunit.smoke.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,12 @@
<env name="APP_MAINTENANCE_DRIVER" value="file"/>
<env name="BCRYPT_ROUNDS" value="4"/>
<env name="CACHE_STORE" value="array"/>
<env name="DB_CONNECTION" value="sqlite"/>
<env name="DB_DATABASE" value=":memory:"/>
<env name="DB_CONNECTION" value="mysql"/>
<env name="DB_HOST" value="127.0.0.1"/>
<env name="DB_PORT" value="3306"/>
<env name="DB_DATABASE" value="testing"/>
<env name="DB_USERNAME" value="root"/>
<env name="DB_PASSWORD" value="root"/>
<env name="MAIL_MAILER" value="array"/>
<env name="PULSE_ENABLED" value="false"/>
<env name="QUEUE_CONNECTION" value="sync"/>
Expand Down
8 changes: 6 additions & 2 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,12 @@
<env name="APP_MAINTENANCE_DRIVER" value="file"/>
<env name="BCRYPT_ROUNDS" value="4"/>
<env name="CACHE_STORE" value="array"/>
<env name="DB_CONNECTION" value="sqlite"/>
<env name="DB_DATABASE" value=":memory:"/>
<env name="DB_CONNECTION" value="mysql"/>
<env name="DB_HOST" value="127.0.0.1"/>
<env name="DB_PORT" value="3306"/>
<env name="DB_DATABASE" value="testing"/>
<env name="DB_USERNAME" value="root"/>
<env name="DB_PASSWORD" value="root"/>
<env name="MAIL_MAILER" value="array"/>
<env name="PULSE_ENABLED" value="false"/>
<env name="QUEUE_CONNECTION" value="sync"/>
Expand Down
Loading