-
Notifications
You must be signed in to change notification settings - Fork 84
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
ci(cypress): add cypress dashboard #2880
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 39fd00af9195271f4c5f7554ce2e4a409f75bf14:
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 17ef8a6:
|
1288b15
to
ee846ee
Compare
ae17060
to
870808f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove changes related to Team City.
Let's keep this change to Travis only, then we can do a separate PR for CodeShip.
Converted to draft to prevent merging while @DlgSHi works on Code Ship. |
@jamime thanks for your questions,
|
cypress/README.md
Outdated
* Only build suite tests, which are running on Travis after every change/commit/push in the repository. To run use:`npm run test-cypress-build`; | ||
* Only accessibility suite tests, which are running on TeamCity nightly and verifying do the components have the accessibility vulnerabilities. To run use:`npm run test-cypress-accessibility`; | ||
* Regression test suite runs on TeamCity nightly and makes all regression tests. To use run: `npm run test-cypress-regression`. | ||
6. Run cypress `npx cypress open` or `npm run test-cypress`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Write a description of what happens after running these commands, and how to run one specific test file on local
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
@@ -483,3 +457,19 @@ When('I click onto root in Test directory in iFrame', () => { | |||
Then('totalRecords is set to {string} {word}', (totalRecords, element) => { | |||
pagerSummary().invoke('text').should('contain', `${totalRecords} ${element}`); | |||
}); | |||
|
|||
Then('{string} component is visible', (component) => { | |||
getComponentNoIframe(component).should('exist'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be visible
or exist
? Please change the name of step or assertion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deleted
}); | ||
|
||
Then('{string} element is visible', (element) => { | ||
getElementNoIframe(element).should('exist'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be visible
or exist
? Please change the name of step or assertion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deleted
}); | ||
|
||
Then('{string} element is visible by name', (element) => { | ||
getElementNoIframeByName(element).should('exist'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be visible
or exist
? Please change the name of step or assertion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deleted
Ah yes, in that link I see that
So the fork won't run the build, but there should be an action run from our repo which is what we want 👍 Happy with the permissions too. It's a shame about the time taken. We have two options
For now I think its acceptable that PR's take 2.5 hours to run, the user should be running the tests locally first. It's unlikely that we will review it within 2.5 hours of submitting the PR anyway. |
2094767
to
d4f708e
Compare
@jamime If someone does PR from a fork - you can push their branch/commit to github.com/sage/carbon as a manual step and that will run CI on it our side but will update the PR status to reflect it as the commit hash is the same. So don't need to grant contributor access or anything |
If we already know that PR's from forks are going to run in one thread, can we make it so we don't spawn as many runners. Maybe detect if the record key has been set, I don't think it's possible to detect a fork pr event. |
43fd66a
to
c1bacea
Compare
I raised some issues
We have been able to make it run on 1 runner on a fork PR and 20 runners on a regular PR. We still have a little inefficiency when 19 runners might be waiting for the last one to complete, but we can't fix this at this time. |
🎉 This PR is included in version 20.1.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Proposed behaviour
We've got approved OSS cypress plan for carbon so we need to:
.travis.yml
file to excludecypress
tests from it;cypress-parallel.yml
in.github/workflows/
to run all regression using Github Actions CI;deprecated
cypress tests;docker
/TeamCity
setup;package.json
filescript
section;README.md
files forcypress
andcarbon
.Important
carbon
fork - the GitHub Actions will not pass thecypress record key
for that PR that's why the tests will run for 2,5 hours on 1 thread and will not block other runs.After implementation the code the time for parallel tests for all regression test suite is approx ~10-12 min.

dashboard link
Current behaviour
We are running all our cypress test on one thread. All regression suite took for a approx ~3h.
Checklist
- [ ] Release notes (Conventional Commits)- [ ] Unit tests- [ ] Storybook added or updated- [ ] Theme support- [ ] Typescriptd.ts
file added or updatedAdditional context
Testing instructions
all suites run on Travis using two new script commands: