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

ci: migrate site E2E workflow #45235

Merged
merged 3 commits into from
Oct 11, 2023

Conversation

Wxh16144
Copy link
Member

@Wxh16144 Wxh16144 commented Oct 9, 2023

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Workflow
  • Other (about what?)

🔗 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 会监听到构建失败,然后再评论区提示构建错误。 不知道能否符合预期。

image

📝 Changelog

Language Changelog
🇺🇸 English --
🇨🇳 Chinese --

☑️ Self-Check before Merge

⚠️ Please check all items below before requesting a reviewing. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

🚀 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

  • Add a new workflow job site-e2e-test to run end-to-end tests for the website before deploying it (link)
  • Remove the redundant file .github/workflows/site-test.yml (link)

@stackblitz
Copy link

stackblitz bot commented Oct 9, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2023

key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}

- name: site e2e test
run: npm run predeploy
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

link 一个快照,关于 predeploy 命令

"predeploy": "antd-tools run clean && npm run site && cp CNAME _site && npm run site:test",

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这样 run site 要多构建一次。

Copy link
Member Author

@Wxh16144 Wxh16144 Oct 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是的,我在 pr 描述里面说明了这点,在看看有没有其他方式?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

有必要的话, 文件里也加注释好一点

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

放 preview build 里面呢?

Copy link
Member Author

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 会监听到构建失败,然后会在评论区提示构建错误。 不知道能否符合预期?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感觉还是从 preview-build 拆一个 job 出来好一些

@argos-ci
Copy link

argos-ci bot commented Oct 9, 2023

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No change detected - Oct 10, 2023, 9:00 AM

@codecov
Copy link

codecov bot commented Oct 9, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (63ececf) 100.00% compared to head (93b7278) 100.00%.
Report is 1 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

@yoyo837
Copy link
Contributor

yoyo837 commented Oct 9, 2023

Memory Boom!

@afc163 afc163 merged commit f5d1c11 into ant-design:master Oct 11, 2023
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants