Skip to content

Commit 626591e

Browse files
huntye1wenming2020
andauthored
chore: increment CI check (#35)
* chore: 支持changed_files 脚本 * test: 测试效果 * chore: 修改为原子 * Revert "test: 测试效果" This reverts commit d268785. * chore: enable increment check * chore: 补充ci交互 * chore: remove chinese info * chore: main ci check * chore: enable more increment action * fix: worker pool issue * chore: update ut test * fix: ts ci error * fix: ts ci error * chore: fix ci error * chore: fix ci error * test: 测试效果 * chore: add failure * fix: ci issue * fix: ci issue * chore: rm test code * chore: 测试代码 * chore: opt ut * chore: enable continue on error * refactor(build): enhance TypeScript configuration and rush-x increment build - Update TypeScript configurations across multiple packages - Modify rush-x increment build action and tests - Update package dependencies in various utility packages * docs: update CI badge link in README * chore: update comments and maintainer info - Translate Chinese comments to English in test files - Update maintainer info in package-audit package.json - Fix package name in rush-x README --------- Co-authored-by: wenming.2020 <[email protected]>
1 parent b2aec1c commit 626591e

File tree

102 files changed

+7318
-30
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+7318
-30
lines changed

.github/workflows/ci.yml

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
# should be optimize as increment build & test
21
name: CI
32
on:
4-
push:
5-
branches: ['main']
63
pull_request:
74
branches: ['main']
85
# Allows you to run this workflow manually from the Actions tab
@@ -22,6 +19,10 @@ jobs:
2219
with:
2320
fetch-depth: 1
2421

22+
- name: Get changed files
23+
id: changed-files
24+
uses: tj-actions/changed-files@v45
25+
2526
- name: Config Git User
2627
# should be turn to ci user
2728
run: |
@@ -35,21 +36,33 @@ jobs:
3536
- name: Install Dependencies
3637
run: node common/scripts/install-run-rush.js install
3738

38-
- name: Build
39-
run: node common/scripts/install-run-rush.js build --verbose
39+
- name: Increment Build
40+
run: node infra/rush-x/bin/run increment --action build -f "${{ steps.changed-files.outputs.all_changed_files }}" -s ' '
41+
continue-on-error: true
42+
43+
- name: Increment Test:cov
44+
run: node infra/rush-x/bin/run increment --action test:cov -f "${{ steps.changed-files.outputs.all_changed_files }}" -s ' '
45+
continue-on-error: true
46+
47+
- name: Increment Lint
48+
run: node infra/rush-x/bin/run increment --action lint -f "${{ steps.changed-files.outputs.all_changed_files }}" -s ' '
49+
continue-on-error: true
50+
51+
- name: Increment TS Check
52+
run: node infra/rush-x/bin/run increment --action ts-check -f "${{ steps.changed-files.outputs.all_changed_files }}" -s ' '
53+
continue-on-error: true
4054

41-
- name: Test:cov
42-
run: node common/scripts/install-run-rush.js test:cov --verbose
55+
- name: Increment Package Audit
56+
run: node infra/rush-x/bin/run increment --action package-audit -f "${{ steps.changed-files.outputs.all_changed_files }}" -s ' '
57+
58+
- name: Fail if any report failed
59+
# NOTICE: To show all reports from the previous steps, the last step should check if any jobs failed.
60+
if: env.REPORT_RESULT == 'failed'
61+
run: echo "::notice::Please check 「 Summary 」 for detail info" && exit 1
4362

4463
- name: Upload coverage reports
4564
uses: codecov/codecov-action@v4
4665
with:
4766
token: ${{ secrets.CODECOV_TOKEN }}
4867
fail_ci_if_error: true
4968
verbose: true
50-
51-
- name: Lint
52-
# for current stage, we got so much lint error, so we have to ignore it
53-
# TODO: it should be fixed ASAP
54-
continue-on-error: true
55-
run: node common/scripts/install-run-rush.js lint --verbose
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# should be optimize as increment build & test
2+
name: CI@main
3+
on:
4+
push:
5+
branches: ['main']
6+
# Allows you to run this workflow manually from the Actions tab
7+
workflow_dispatch:
8+
jobs:
9+
build:
10+
strategy:
11+
matrix:
12+
include:
13+
- NodeVersion: 20.9.x
14+
NodeVersionDisplayName: 20
15+
OS: ubuntu-latest
16+
name: Node.js v${{ matrix.NodeVersionDisplayName }} (${{ matrix.OS }})
17+
runs-on: ${{ matrix.OS }}
18+
steps:
19+
- uses: actions/checkout@v3
20+
with:
21+
fetch-depth: 1
22+
23+
- name: Config Git User
24+
# should be turn to ci user
25+
run: |
26+
git config --local user.name "tecvan"
27+
git config --local user.email "[email protected]"
28+
29+
- uses: actions/setup-node@v3
30+
with:
31+
node-version: ${{ matrix.NodeVersion }}
32+
33+
- name: Install Dependencies
34+
run: node common/scripts/install-run-rush.js install
35+
36+
- name: Build all
37+
run: node common/scripts/install-run-rush.js build --verbose
38+
39+
- name: Test:cov all
40+
run: node common/scripts/install-run-rush.js test:cov --verbose
41+
42+
- name: Upload coverage reports
43+
uses: codecov/codecov-action@v4
44+
with:
45+
token: ${{ secrets.CODECOV_TOKEN }}
46+
fail_ci_if_error: true
47+
verbose: true
48+
49+
- name: Lint all
50+
run: node common/scripts/install-run-rush.js lint --verbose

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Monorepo of Coze Orz
2-
[![codecov](https://codecov.io/gh/coze-dev/coze-js/graph/badge.svg?token=W5EBMZ0NUE)](https://codecov.io/gh/coze-dev/coze-js) ![ci](https://github.com/coze-dev/coze-js/actions/workflows/ci.yml/badge.svg)
2+
[![codecov](https://codecov.io/gh/coze-dev/coze-js/graph/badge.svg?token=W5EBMZ0NUE)](https://codecov.io/gh/coze-dev/coze-js) ![ci](https://github.com/coze-dev/coze-js/actions/workflows/ci@main.yml/badge.svg)
33

44
## 📦 Packages
55

0 commit comments

Comments
 (0)