How to run e2e tests in gitlab with 2 repo's?

On SO the question was flagged as not “specific” enough, hope someone can give me a hint here:


Currently I run the e2e tests locally every time before deployment. I want to automate this.

Current steps to run the e2e tests correctly:
Drop, create, migrate, seed DB & start server

npm run e2e-server
npm run e2e

The API and the Client are in 2 separate repo’s. How do I get them to interact in order to execute the e2e tests, when I deploy my client to gitlab?

I got this tip from the elixir forum:
How about simply cloning each others repo in tests? By setting up read only deploy keys this should work. Even the repo itself is just cloned into the runner albeit automatically.

So the idea will be to add something like this to the gitlab-ci.yml file:

  1. git clone the other repo, by setting up “read only deploy keys”
  2. run the commands for the API
  3. run the e2e

I’ll be posting updates here. Or if someone has tips, let me know.

first step: cloning private repo:

  • git clone git@git.< site>.com:< project>/< repo>.git

now it asks for a username and password, how can I set these automatically?

aha, I have to become project master first to add the deploy keys.