Mobile monorepo config

Hi,

We have a mobile monorepo using react-native with an ios and and android directory. The config we want to set up would run only ios tests if there were only changes in the ios directory, only android tests if there were only changes in the android directory, and if there were any other changes in the repo, run both. The changes would be determined by the base branch of the pull request, which would either be “staging” or “master.”

Is there an example of this sort of workflow configuration somewhere? I have referred to the “path filtering or” and Intro to Dynamic Config including this example repo GitHub - circle-makotom/circle-advanced-setup-workflow without success setting up our own project.

1 Like

When I tried to create a config based on the example repo above, using the circleci/continuation orb, the CircleCI output printed “CIRCLE_CONTINUATION_KEY is required. Make sure setup workflows are enabled.” This error failed the build. I set an environment variable named CIRCLE_CONTINUATION_KEY that produced the same result.

Are you able to share some of the config you created? You don’t need to create that environment variable yourself. You should remove it as that will likely cause issues. That envar is automatically set inside the setup workflow. This might be a basic question, but are you sure you’ve enabled the setup workflows in the project settings page?

Once that’s enabled you should be able to add setup: true to the config.yml to make it a setup config. And then you can define the setup workflow/jobs in there. That envar will be automatically injected. And you can use the path filtering orb to decide which CircleCI config it should run. You can make a different config file for ios or android folders, and keep them all in the .circleci folder. If you can share the config you have so far it may be helpful