Skip to content

Commit

Permalink
CYCLOUD-1740 multi repo best practices (#5562)
Browse files Browse the repository at this point in the history
* crop dialog image

* add multi repo best practices

* tweaks

* remove BR ref

* tweaks

* streamline verbiage

* tweak

* adjust callout class

* link from branch review page
  • Loading branch information
jaffrepaul authored Nov 16, 2023
1 parent c8dd11d commit 06e568f
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
29 changes: 29 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,35 @@ 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

### Multi-repo Implementation

When Cypress tests reside in a repository separate from the application code, it creates a suboptimal Cloud experience - especially when considering the commit and branch interpretation for each git directory.

:::info

For any given Cypress project, all commits or branches associated to recorded runs should belong 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 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
4 changes: 4 additions & 0 deletions docs/guides/cloud/branch-review.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -207,3 +207,7 @@ Cypress Cloud allows for [grouping recorded tests](/guides/cloud/smart-orchestra
Recording multiple test runs per commit without grouping will cause issues, as Branch Review relies on the _latest_ run. Therefore, recording one run per commit and utilizing grouping is essential to improving effectiveness and ensure an accurate comparison between branches.

:::

## See Also

- Read about [multi-repo implementation](/guides/cloud/account-management/projects#Multi-repo-Implementation) best practices in Cypress Cloud.
Binary file modified static/img/guides/cloud/projects/remove-project-dialog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 06e568f

Please sign in to comment.