-
-
Notifications
You must be signed in to change notification settings - Fork 50.6k
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: migrate site E2E workflow #45235
ci: migrate site E2E workflow #45235
Conversation
Run & review this pull request in StackBlitz Codeflow. |
.github/workflows/test.yml
Outdated
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} | ||
|
||
- name: site e2e test | ||
run: npm run predeploy |
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.
link 一个快照,关于 predeploy
命令
Line 67 in 63ececf
"predeploy": "antd-tools run clean && npm run site && cp CNAME _site && npm run site:test", |
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.
这样 run site 要多构建一次。
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.
是的,我在 pr 描述里面说明了这点,在看看有没有其他方式?
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.
有必要的话, 文件里也加注释好一点
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.
放 preview build 里面呢?
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.
放 preview build 里面呢?
但是这样会存在一个问题,如果 site test 未通过,下面的 preview-deploy 会监听到构建失败,然后会在评论区提示构建错误。 不知道能否符合预期?
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.
感觉还是从 preview-build 拆一个 job 出来好一些
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #45235 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 692 692
Lines 11663 11663
Branches 3117 3117
=========================================
Hits 11663 11663 ☔ View full report in Codecov by Sentry. |
Memory Boom! |
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
💡 Background and solution
上次 #45133 添加的 flow 为了不重复构建,直接复用了 preview-build 的产物,然后再执行 site test。 这样会有一个不好的是 pr 的 check 列表里面看不到 ci 状态。
一个解决方案是保持之前逻辑,然后再加一个步骤,用
actions-cool/maintain-one-comment
评论一个 ci 测试状态。 这个方案链路拉的太长了,隧放弃。另外一个解决方案, 把测试直接搬到test.yml
这个 Workflow 中,尽管他还是需要多执行一次站点构建,但是可能会直观许多。另外一个解决方案是当前这个 pr, 直接在 preview-build 这个 Workflow 中,在 build 的 job 中直接再执行 site:test。 但是这样会存在一个问题,如果 site test 未通过,下面的 preview-deploy 会监听到构建失败,然后再评论区提示构建错误。 不知道能否符合预期。
📝 Changelog
☑️ Self-Check before Merge
🚀 Summary
🤖 Generated by Copilot at 42d88ca
This pull request removes an unused workflow file and adds a new workflow job to run end-to-end tests for the
ant-design
website. This aims to enhance the website's quality and reliability by automating the testing process.🔍 Walkthrough
🤖 Generated by Copilot at 42d88ca
site-e2e-test
to run end-to-end tests for the website before deploying it (link).github/workflows/site-test.yml
(link)