Automated Tests with Laravel Dusk on Gitlab CI/CD

Опубликовано: 30 Март 2026
на канале: Owen Conti
4,923
41

I think the problem with the MySQL service is that the 5.7 tag is expose multiple ports. Gitlab has an open issue with services that expose multiple ports.

I was able to get the MySQL service running by specifying an explicit version, eg: 5.7.21

I also had a problem with the ENV variables being passed to Laravel when Dusk was running. I recommend not using the `variables` section for Laravel variables, and instead create a dedicated `.env.dusk.*` file.

Dusk: https://laravel.com/docs/6.x/dusk
Gitlab CI/CD: https://docs.gitlab.com/ee/ci/

---

Thanks for watching!

Twitter:   / owenconti  
Website: https://owenconti.com