Are the services in a matrix shared?

Hello to everyone,

I want to create a workflow to test a project (unit testing). As a database is involved, I need to use a service (MySQL for example). Additionally I want to test different variants thus I need a matrix as well.

Of course, it would be not helping if the individual runs (representing instances in the matrix) would affect each other. Therefore I want to know if the services are shared between the matrix entries.

To make it clear: Normally I would need to create a database on start of the unit testing run. If multiple (parallel) runs access the very same (logical) database that would break the test most probably. I can circumvent this by creating a (logical) database in the MySQL instance (CREATE DATABASE ...) but I need to know it.

So: Is there for each entry in the matrix a complete (virtual) runner generated with an independent environment and independant set of service containers or are the entries run in one and the same virtual runner by default?

Thanks for your support

1 Like

Each matrix entry creates a job, and each job gets assigned its own runner (which for Github hosted runners means a fresh VM). So the environments are completely separate.

1 Like

Thank you very much for the quick ans complete answer.