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
[test] Add E2E website tests #30128
[test] Add E2E website tests #30128
Conversation
8e60cba
to
c74bba8
Compare
5bcec79
to
4a6cfce
Compare
4a6cfce
to
bf49a59
Compare
cc9e251
to
84461f8
Compare
…docs/e2e-website
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 leave in the PR description what is the motivation for adding these tests and how we are going to use them during the migration of the docs
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.
Happy to see an infra in place to be able to test the website/docs. This will be needed as we grow. I didn't look at the execution to solve this problem in detail, but it seems quite good.
| console.info(`url:`, payload.deploy_ssl_url); | ||
|
|
||
| // for more details > https://circleci.com/docs/2.0/api-developers-guide/# | ||
| await fetch(`https://circleci.com/api/v2/project/gh/${repo[1]}/pipeline`, { |
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.
A side though, the alternative option would be to:
- Run
yarn docs:buildin CircleCI - Use something to serve in the CirleCI build the .html and .js files in
/docs/.next - Run the e2e test against it
Pros:
- In the same CircleCI workflow
Potential advantage:
- If we have better CircleCI machines, then
yarn docs:buildwould build faster, but if we upgrade Netlify to a performance build, or migrate to Vercel with better build time, then that could be the opposite
Cons:
- We build the docs twice (once in Netlify, and once in CircleCI)
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.
I think if we can do this, that'd be great:
- build the docs
- run the e2e-test
- deploy to netlify
all of these steps are in CircleCI
Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com>
Motivation
Summary
test/e2e-website(mostly test that all thehrefhave correct URL)deploy-succeeded.jshook to trigger the e2e-website pipeline via CircleCI API (This will test against the deploy preview URL)