Database, Git, GitHub, Laravel, MySQL, Test

GitHub Action – MySQL Service for Laravel with Multiple Databases


Today I will share with you on how to use MySQL Service in GitHub Action – and I know it’s been quite a lot tutorial on that.

But let’s make a bit more fun, what if you need 1 than database?

The following are the standard setup of using MySQL Service in GitHub Action.

Now, what’s important is the next step:

Noticed that, I have steps to verify and create databases that I need for unit tests. This to ensure the databases are all created.

Once created, you can use the databases. As in above example, the steps are for Laravel project.

Following are the full GitHub Action config file.

Nasrul Hazim

Leave a Reply

Your email address will not be published. Required fields are marked *

2 × 4 =