I’m been digging up the web for two weeks and could not find a valid solution. In my team, we have a React Native application and we started to work on automating the tests. Our approach is like e2e when the application automated tests require a backend to work with.
On our other projects, we have a docker-compose that sets up the backend with the MySQL and all the other dependencies and this is where the plot gets thickens. The MacOS image on GitHub action does not have the docker and the docker-compose installed and that prevents us from setting up the backend (why? due to licensing issues which covered in another topic).
There are two solutions:
- Using a self-hosted runner - that’s requires us to have a server that listens to events but that’s mean that it can serve only one commit at a time and also have a test runner for the android environment and for the IOS environment
- Have two jobs - One way I thought is to have a job that runs on ubuntu and set up the backend. Later on, the tests will run against the ubuntu machine. Two problems with that:
- The ubuntu has a static IP in which I don’t know of and is not accessible from outside
- When trying to use ngrok, HTTP tunneling service, once the job finished the machine is being shut down alongside the backend
Any idea? We kind of list here