Fix Cypress Cloud Recording Configuration #672
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Hi maintainers! I noticed Cypress tests in CI are failing. Would you like to enable Cypress Cloud recording, or should I disable it instead?
Cypress tests in CI are failing with the following error:
Root Cause:
record: trueenabled (line 48 of .github/workflows/yarn_test.yaml)secrets.CYPRESS_PROJECT_IDandsecrets.CYPRESS_RECORD_KEYOption A: Enable Cypress Cloud (if you'd like)
Changes made to implement this fix
projectIdwith clear TODO commentIf you'd like to enable Cypress Cloud recording, I'd need some help getting the credentials. Here's what would be needed:
1. Getting Cypress Cloud Credentials
If you have access to the Cypress Dashboard:
abc123)2. Adding GitHub Secrets
If you could add these two secrets to the repository at:
https://github.com/openclimatefix/quartz-frontend/settings/secrets/actionsCYPRESS_PROJECT_IDabc123(example)CYPRESS_RECORD_KEYa1b2c3d4-e5f6-...(example)Once these are added, the CI should automatically pick them up and recording will work!
Testing
Before Secrets are Added
The configuration will use the placeholder value. Tests will run but may show warnings.
After Secrets are Added
Local Testing
Option B: Disable Recording
If you prefer not to use Cypress Cloud recording, you can instead:
record: falsein .github/workflows/yarn_test.yaml (line 48)CYPRESS_RECORD_KEYandCYPRESS_PROJECT_IDfrom env block (lines 61-62)Tests will still run locally and in CI, just not recorded to Cypress Cloud.
Let me know which approach you prefer!
Checklist
CYPRESS_PROJECT_IDto GitHub SecretsCYPRESS_RECORD_KEYto GitHub SecretsBenefits
Questions? Happy to help with either approach or discuss further! Let me know what works best for your team.