-
-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
11387de
commit a8a0ae8
Showing
1 changed file
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: Manual Check Publish | ||
|
||
on: | ||
workflow_dispatch: # 使得该工作流可以通过 GitHub UI 手动触发 | ||
|
||
jobs: | ||
test-jslib-js: | ||
name: Test jslib with JS projects | ||
runs-on: ubuntu-latest # 在 Ubuntu 上运行 | ||
|
||
strategy: | ||
matrix: | ||
node-version: [18, 20, 22] # 测试不同的 Node.js 版本 | ||
|
||
steps: | ||
- name: Set up Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} # 使用不同的 Node.js 版本 | ||
|
||
- name: Create new JS project | ||
run: echo js-project | npx @js-lib/cli new --npmname js-project --umdname js-project --username yanhaijing --type js --lang en --manager npm | ||
|
||
- name: Run lint in JS project | ||
working-directory: ./js-project | ||
run: npm run lint | ||
|
||
- name: Run tests in JS project | ||
working-directory: ./js-project | ||
run: npm run test | ||
|
||
- name: Build JS project | ||
working-directory: ./js-project | ||
run: npm run build | ||
|
||
- name: Update JS project | ||
working-directory: ./js-project | ||
run: jslib update | ||
|
||
test-jslib-ts: | ||
name: Test jslib with TS projects | ||
runs-on: ubuntu-latest # 在 Ubuntu 上运行 | ||
|
||
strategy: | ||
matrix: | ||
node-version: [18, 20, 22] # 测试不同的 Node.js 版本 | ||
|
||
steps: | ||
- name: Set up Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} # 使用不同的 Node.js 版本 | ||
|
||
- name: Create new TS project | ||
run: echo ts-project | npx @js-lib/cli new --npmname ts-project --umdname ts-project --username yanhaijing --type ts --lang en --manager npm | ||
|
||
- name: Run lint in JS project | ||
working-directory: ./ts-project | ||
run: npm run lint | ||
|
||
- name: Run tests in JS project | ||
working-directory: ./ts-project | ||
run: npm run test | ||
|
||
- name: Build JS project | ||
working-directory: ./ts-project | ||
run: npm run build | ||
|
||
- name: Update JS project | ||
working-directory: ./ts-project | ||
run: jslib update |