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: add TDesign Component Repositories CI Test #2054

Merged
merged 19 commits into from
Feb 8, 2025
6 changes: 3 additions & 3 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
node-version-file: .node-version
- uses: actions/cache@v4
env:
cache-name: cache-nodemodules
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
- name: init site deploy
uses: actions/setup-node@v4
with:
node-version: 18
node-version-file: .node-version
- run: |
cp -rf style/web/* target-repo/src/_common/style/web
cd target-repo/src/_common/
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
- name: init site deploy
uses: actions/setup-node@v4
with:
node-version: 18
node-version-file: .node-version
- run: |
cp -rf style/mobile/* target-repo/src/_common/style/mobile
cd target-repo/
Expand Down
157 changes: 157 additions & 0 deletions .github/workflows/test-component.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
name: TEST_COMPONENT
uyarn marked this conversation as resolved.
Show resolved Hide resolved

on:
workflow_run:
workflows:
- MAIN_PULL_REQUEST
types:
- completed

jobs:
tdesign-vue:
if: github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
steps:
- name: Checkout tdesign-vue
uses: actions/checkout@v4
with:
repository: Tencent/tdesign-vue

- name: Checkout tdesign-common
uses: actions/checkout@v4
with:
path: src/_common
ref: ${{ github.event.workflow_run.head_sha }}

- uses: actions/setup-node@v4
with:
node-version-file: .node-version

- run: npm install
- run: npm run lint
- run: npm run test
- run: npm run build

tdesign-vue-next:
if: github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
steps:
- name: Checkout tdesign-vue-next
uses: actions/checkout@v4
with:
repository: Tencent/tdesign-vue-next

- name: Checkout tdesign-common
uses: actions/checkout@v4
with:
path: packages/common
ref: ${{ github.event.workflow_run.head_sha }}

- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: 'pnpm'

- run: pnpm install --frozen-lockfile
- run: pnpm run lint
- run: pnpm run test
- run: pnpm run build

tdesign-react:
if: github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
steps:
- name: Checkout tdesign-react
uses: actions/checkout@v4
with:
repository: Tencent/tdesign-react

- name: Checkout tdesign-common
uses: actions/checkout@v4
with:
path: src/_common
ref: ${{ github.event.workflow_run.head_sha }}

- uses: actions/setup-node@v4
with:
node-version-file: .node-version

- run: npm install
- run: npm run lint
- run: npm run test
- run: npm run build

tdesign-web-components:
if: github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
steps:
- name: Checkout tdesign-web-components
uses: actions/checkout@v4
with:
repository: TDesignOteam/tdesign-web-components

- name: Checkout tdesign-common
uses: actions/checkout@v4
with:
path: src/_common
ref: ${{ github.event.workflow_run.head_sha }}

- uses: actions/setup-node@v4
with:
node-version-file: .node-version

- run: npm install
- run: npm run lint
- run: npm run test
- run: npm run build

tdesign-mobile-vue:
if: github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
steps:
- name: Checkout tdesign-mobile-vue
uses: actions/checkout@v4
with:
repository: Tencent/tdesign-mobile-vue

- name: Checkout tdesign-common
uses: actions/checkout@v4
with:
path: src/_common
ref: ${{ github.event.workflow_run.head_sha }}

- uses: actions/setup-node@v4
with:
node-version-file: .node-version

- run: npm install
- run: npm run lint
- run: npm run test
- run: npm run build

tdesign-mobile-react:
if: github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
steps:
- name: Checkout tdesign-mobile-react
uses: actions/checkout@v4
with:
repository: Tencent/tdesign-mobile-react

- name: Checkout tdesign-common
uses: actions/checkout@v4
with:
path: src/_common
ref: ${{ github.event.workflow_run.head_sha }}

- uses: actions/setup-node@v4
with:
node-version-file: .node-version

- run: npm install
- run: npm run lint
- run: npm run test
- run: npm run build

1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18
uyarn marked this conversation as resolved.
Show resolved Hide resolved