chore: updated the contribution guide, optimized the instructions on triggering component e2e tests (#3348)

This commit is contained in:
ajaxzheng 2025-04-25 14:31:32 +08:00 committed by GitHub
parent 4b806d96d0
commit 7807c33b93
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 13 deletions

View File

@ -57,17 +57,15 @@ The commit message should be in the form of a `type(scope): description of the m
1. The specification of the title is the same as the commit information, which is entered in the form of `type(scope): description information`.
2. **e2e test** of trigger components: Adding '[componentName1, componentName2]' to the Pull Request title will execute test cases for componentName1, componentName2, and declare this structure when changes to code affect components.
2. Trigger component **e2e test**: CI will automatically trigger the test cases of the corresponding components according to the files modified by the PR. If you need to manually trigger the test of a specific component, you can add the component name in the format of `[componentName1, componentName2]` in the Pull Request title, and the system will execute the test cases of these specified components.
- Note: The `github action` in this project identifies test e2e use cases to be executed by matching the component names declared by `[componentName1, componentName2]` with the path names in the `examples/sites/demos` directory. (Because running the full test case is too time consuming)
- When modifying a sub-component of a component, such as the `col` component, which has no corresponding examples and test cases, the `layout` component should be tested, because the `col` component is a sub-component of the `layout` component. The PR title can be: `fix(col): [layout] xxxxxxxxxxxxxx`
- Note: The `github action` under this project will use the component name declared by `[componentName1, componentName2]` to match the path name under the `examples/sites/demos` directory to identify the test e2e cases to be executed. (Because running all test cases is too time-consuming)
3. Example title:
- Supplement alert component document: `docs(alert): [alert] xxxxxxxxxxxxxxx`, `docs(site): [alert] xxxxxxxxxxxxxxx`
- Supplement alert component test case: `test(alert): [alert] xxxxxxxxxxxxxx`
- Fixed bug in alert component @opentiny/vue-renderless: `fix(vue-renderless/alert): [alert] xxxxxxxxxxxxxx`
- Added alert component documentation: `docs(alert): xxxxxxxxxxxxxxx`, `docs(site):xxxxxxxxxxxxxxx`
- Added alert component test cases: `test(alert): xxxxxxxxxxxxxx`
- Fixed the defect of alert component @opentiny/vue-renderless (manually trigger e2e test cases): `fix(vue-renderless/alert): [alert] xxxxxxxxxxxxxxx`
#### Pull Request Description

View File

@ -57,17 +57,15 @@ commit 信息要以 `type(scope): 描述信息` 的形式填写,例如 `fix(vu
1. 标题的规范与 commit 信息一样,以`type(scope): 描述信息` 的形式填写。
2. 触发组件的 **e2e 测试**: 在 Pull Request 标题里添加 `[componentName1, componentName2]`,将会执行 componentName1componentName2 的测试用例,当改动的代码会影响组件时,需要声明这个结构
2. 触发组件的 **e2e 测试**: CI 会自动根据 PR 修改的文件来触发相应组件的测试用例。如果需要手动触发特定组件的测试,可以在 Pull Request 标题中添加 `[componentName1, componentName2]` 格式的组件名称,系统将会执行这些指定组件的测试用例
- 注:本项目下的 `github action` 会用`[componentName1, componentName2]`声明的组件名匹配 `examples/sites/demos` 目录下的路径名称识别要执行的测试e2e用例。因为全量跑测试用例太耗费时间
- 当修改了某个组件的子组件,比如`col`组件,它本身没有对应的示例以及测试用例,这时应该要测试的是`layout`组件,因为`col`组件是`layout`组件的子组件PR 标题可以这样: `fix(col): [layout] xxxxxxxxxxxxxx`
3. 标题示例:
- 补充 alert 组件文档: `docs(alert): [alert] xxxxxxxxxxxxxxx`, `docs(site): [alert] xxxxxxxxxxxxxxx`
- 补充 alert 组件测试用例: `test(alert): [alert] xxxxxxxxxxxxxx`
- 修复 alert 组件 @opentiny/vue-renderless 下的缺陷: `fix(vue-renderless/alert): [alert] xxxxxxxxxxxxxx`
- 补充 alert 组件文档: `docs(alert): xxxxxxxxxxxxxxx`, `docs(site):xxxxxxxxxxxxxxx`
- 补充 alert 组件测试用例: `test(alert): xxxxxxxxxxxxxx`
- 修复 alert 组件 @opentiny/vue-renderless 下的缺陷(手动触发 e2e 测试用例): `fix(vue-renderless/alert): [alert] xxxxxxxxxxxxxx`
#### Pull Request 的描述