ci: switch test workflows to MariaDB#461
Conversation
|
@coderabbitai full review |
✅ Action performedFull review finished. |
|
Looking for one thing? Review this PR in Change Stack to search files, summaries, diffs, and code without losing your place. Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThis PR migrates the test infrastructure from in-memory SQLite to MySQL/MariaDB, updating PHPUnit configurations, GitHub Actions workflows with database services, PHP extensions, and documentation across the entire testing pipeline. ChangesSQLite to MySQL Testing Infrastructure
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/RUNNING_TESTS.md:
- Line 173: The sentence "Uses MariaDB/MySQL via the testing database settings
in `.env.testing.example`" is misleading because PHPUnit uses DB_* values
defined in phpunit.xml and phpunit.smoke.xml; update that line to state PHPUnit
reads DB_* from those XML files (phpunit.xml/phpunit.smoke.xml) and that
`.env.testing.example` is only an example/local reference for other tooling, not
the source of PHPUnit DB configuration.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 853f3b70-1c1f-41fa-a5e5-ff173e99e39d
📒 Files selected for processing (11)
.env.testing.example.github/RUNNING_TESTS.md.github/actions/setup-php-composer/action.yml.github/workflows/composer-update.yml.github/workflows/phpunit.yml.github/workflows/quickstart.yml.github/workflows/setup.yml.github/workflows/smoke.yml.github/workflows/yarn-update.ymlphpunit.smoke.xmlphpunit.xml
…ysql and resolve conflicts Resolution strategy: - Service name: use `mariadb` (from develop, more accurate) - MariaDB image: keep `mariadb:11` (from codex branch, newer) - Env vars: use `MYSQL_*` (from develop, broader compatibility) - DB_DATABASE: use `invoiceplane_test` (from develop, consistent naming) - Healthcheck: use `mysqladmin ping --silent` (from develop, simpler) - smoke.yml php-extensions: drop pdo_sqlite/sqlite (codex intent — MySQL-only) - yarn-update.yml: PHP 8.4 (from develop), without pdo_sqlite
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Motivation
SHOW TABLES, so tests should run against MariaDB/MySQL in GitHub Actions to match production behavior.Description
.env.testing.exampleby settingDB_CONNECTION=mysqland addingDB_HOST,DB_PORT,DB_DATABASE,DB_USERNAME, andDB_PASSWORD.phpunit.xmlandphpunit.smoke.xmlto use MySQL connection environment variables instead of SQLite:memory:..github/workflows/phpunit.yml,smoke.yml,quickstart.yml,composer-update.yml,setup.yml,yarn-update.yml) to add a MariaDB service (imagemariadb:11), expose matchingDB_*env vars, and use a MariaDB-friendly healthcheck.sqlitewithpdo_mysqlin the action defaults and workflow PHP extension lists and updated.github/actions/setup-php-composer/action.ymlto default topdo_mysql..github/RUNNING_TESTS.mdto reflect the MariaDB/MySQL-backed PHPUnit configuration.Testing
ruby -e 'require "yaml"; ...'and parsing succeeded for every.github/workflows/*.yml.composer validate --no-check-publishand it passed (Composer schema warnings remain but are unrelated to this change).rgthat the previous SQLite in-memory configuration was removed fromphpunit.xml,phpunit.smoke.xml,.env.testing.exampleand workflows (no remaining SQLite test configuration in checked files).composer installandphp artisan test --env=testinglocally but these were blocked:composer installfailed due to the container PHP version (8.5.7-dev) incompatible with lockedphpoffice/phpspreadsheetconstraints, andphp artisan testcould not run becausevendor/was not available.Codex Task
Summary by CodeRabbit
Chores
Tests