Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CYCLOUD-1740 multi repo best practices #5562

Merged
merged 10 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.