Skip to content

Commit

Permalink
add multi repo best practices
Browse files Browse the repository at this point in the history
  • Loading branch information
jaffrepaul committed Nov 14, 2023
1 parent c91b58c commit 81d070d
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions docs/guides/cloud/account-management/projects.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,33 @@ See also
[Highlight your project's test status with Cypress README badges](https://www.cypress.io/blog/2020/09/02/highlight-your-projects-test-status-with-cypress-readme-badges/)
announcement.

## Best Practices

There is a sceario where you may have Cypress tests in a repo separate from the application code itself. This creates a sub-optimal [Branch Review](guides/cloud/branch-review) experience considering the commit and branch interpretation of each git directory.

:::tip

For any given Cypress project, all commits or branches associated to recorded runs should belong to or relate to a single `.git` repository.

:::

If this is not possible, there are some measures to help organize your data:

1. Create two separate projects in Cypress Cloud, for example, **App Project** and **Test Project**

2. For the **App Project**:

- Link the GitHub integration to the Application code repo
- Override the `COMMIT_INFO_*` environment variables used by the test recording to reflect the state of the checked out Application code repo
- Record any runs related to the Application code repo to **App Project**
- Capture any Cypress config/tests repo related identifiers (short sha/release number) as tags decorated on the run

3. For the **Test Project**:

- Link the GitHub integration to the Cypress config/tests repo
- Ensure any runs recorded to **Test Project** are related to test code changes in the Cypress config/tests repo
- the application code repo state that the tests are executed against here could likewise be captured as tags here, if necessary.

## Third party integrations

You can integrate your project with many third party tools and edit those
Expand Down

0 comments on commit 81d070d

Please sign in to comment.