ARTICLE AD BOX
I’m setting up a GitLab Runner for a Laravel 12 project and I want my CI pipeline to do the following:
Spin up a MariaDB service for the tests Run php artisan migrate:fresh --seed to seed the database Finally run php artisan testI’ve already registered my runner and can run jobs, but I’m not sure how to correctly structure the .gitlab-ci.yml file so that the database is available and seeded before the tests execute. I wasted a lot of hours for this.
Question: Does anyone have a working example of a .gitlab-ci.yml file that only runs php artisan test for a Laravel 12 app with MariaDB, ensuring the database is seeded first with php artisan migrate:fresh --seed?
