I've written some .gitlab-ci.yml files in the last months. What I do is using a script to validate against the Gitlab lint API. This is done every time I save the file.
I also run gitlab-runner on my local machine and test my jobs with `gitlab-runner exec docker`. Don't forget to commit what you need in the job. You don't need to commit the .gitlab-ci.yml, but everything else, because the first step to run the job is cloning the repo.
I have also updated the brew formulas for the last releases of gitlab-runner. Gitlab is great software and I've worked with it and administrated it for the last 5 years. I don't want to miss it.
If your test scripts are running as part of the "before_script", "script", or "after_script" block, they aren't running in the network namespace configured by Docker in Docker and won't have the same name resolution, so you'll need to port map your Docker containers and your test scripts will need to use "localhost" and ports to connect to your containers.
If your tests are themselves run in a Docker container, it should work as expected.