Search code examples
androidmobilegitlabgitlab-cicicd

How to make local mobile device visible for CI tool


I am building automation project and want to run tests automatically on local mobile device, that connected to my machine. For that I uploaded my project to GitLab, created .yml file with commands in CI/CD and created schedule.

The next chalenge: to run tests automatically, on mobile device connected to my machine.

Is any options to make local device visible for GitLab CI/CD?


Solution

  • On your local machine, install the gitlab-runner and register it to your GitLab project. In order to use the device, you'll need to use the shell executor. Be sure to specify at least one unique tag for the runner (say, android for example)

    In your yaml, add the tag you used for your runner in the tags: key. For example:

    myjob:
      tags:
        - android
      script:
      # ...
    

    This will make sure that only your runner will pick up the job.