feat(checkbox): 支持独立按钮风格多选框组 #173
Workflow file for this run
This file contains hidden or 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
| name: component-ci | |
| on: | |
| pull_request: | |
| branches: [develop] | |
| types: [opened, synchronize, reopened] | |
| paths: | |
| - 'docs/**' | |
| - 'js/**' | |
| - 'style/**' | |
| - '.github/workflows/component-ci.yml' | |
| - '.github/workflows/component-ci-call.yml' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| tdesign-vue: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| script: | |
| - lint | |
| - test | |
| - build | |
| - preview | |
| include: | |
| - script: lint | |
| run: npm run lint | |
| - script: test | |
| run: npm run test | |
| - script: build | |
| run: npm run build | |
| - script: preview | |
| run: npm run site:preview | |
| steps: | |
| - name: Checkout tdesign-vue | |
| uses: actions/checkout@v7 | |
| with: | |
| repository: Tencent/tdesign-vue | |
| - name: Checkout tdesign-common | |
| uses: actions/checkout@v7 | |
| with: | |
| path: src/_common | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: .node-version | |
| - run: npm install | |
| - run: ${{ matrix.run }} | |
| - if: matrix.script == 'preview' | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: tdesign-vue-site | |
| path: _site | |
| retention-days: 5 | |
| tdesign-vue-next: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| script: | |
| - lint | |
| - test | |
| - build | |
| - preview | |
| include: | |
| - script: lint | |
| run: pnpm run lint | |
| - script: test | |
| run: pnpm -C packages/tdesign-vue-next/test test | |
| - script: build | |
| run: pnpm -C internal/builds build:vue-next | |
| - script: preview | |
| run: pnpm -C packages/tdesign-vue-next/site preview | |
| steps: | |
| - name: Checkout tdesign-vue-next | |
| uses: actions/checkout@v7 | |
| with: | |
| repository: Tencent/tdesign-vue-next | |
| - name: Checkout tdesign-common | |
| uses: actions/checkout@v7 | |
| with: | |
| path: packages/common | |
| - uses: pnpm/action-setup@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: .node-version | |
| - run: pnpm install | |
| - run: ${{ matrix.run }} | |
| - if: matrix.script == 'preview' | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: tdesign-vue-next-site | |
| path: packages/tdesign-vue-next/site/dist | |
| retention-days: 5 | |
| tdesign-react: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| script: | |
| - lint | |
| - test | |
| - build | |
| - preview | |
| include: | |
| - script: lint | |
| run: pnpm run lint | |
| - script: test | |
| run: pnpm run test | |
| - script: build | |
| run: pnpm run build | |
| - script: preview | |
| run: pnpm -C packages/tdesign-react/site preview | |
| steps: | |
| - name: Checkout tdesign-react | |
| uses: actions/checkout@v7 | |
| with: | |
| repository: Tencent/tdesign-react | |
| submodules: recursive | |
| - run: rm -rf packages/common | |
| - name: Checkout tdesign-common | |
| uses: actions/checkout@v7 | |
| with: | |
| path: packages/common | |
| - uses: pnpm/action-setup@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: .node-version | |
| - run: pnpm install | |
| - run: ${{ matrix.run }} | |
| - if: matrix.script == 'preview' | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: tdesign-react-site | |
| path: packages/tdesign-react/site/dist | |
| retention-days: 5 | |
| tdesign-mobile-vue: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| script: | |
| - lint | |
| - test | |
| - build | |
| - preview | |
| include: | |
| - script: lint | |
| run: npm run lint | |
| - script: test | |
| run: npm run test | |
| - script: build | |
| run: npm run build | |
| - script: preview | |
| run: npm run site:preview | |
| steps: | |
| - name: Checkout tdesign-mobile-vue | |
| uses: actions/checkout@v7 | |
| with: | |
| repository: Tencent/tdesign-mobile-vue | |
| - name: Checkout tdesign-common | |
| uses: actions/checkout@v7 | |
| with: | |
| path: src/_common | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: .node-version | |
| - run: npm install | |
| - run: ${{ matrix.run }} | |
| - if: matrix.script == 'preview' | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: tdesign-mobile-react-site | |
| path: _site | |
| retention-days: 5 | |
| tdesign-mobile-react: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| script: | |
| - lint | |
| - test | |
| - build | |
| - preview | |
| include: | |
| - script: lint | |
| run: npm run lint | |
| - script: test | |
| run: npm run test | |
| - script: build | |
| run: npm run build | |
| - script: preview | |
| run: npm run site:preview | |
| steps: | |
| - name: Checkout tdesign-mobile-react | |
| uses: actions/checkout@v7 | |
| with: | |
| repository: Tencent/tdesign-mobile-react | |
| - name: Checkout tdesign-common | |
| uses: actions/checkout@v7 | |
| with: | |
| path: src/_common | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: .node-version | |
| - run: npm install | |
| - run: ${{ matrix.run }} | |
| - if: matrix.script == 'preview' | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: tdesign-mobile-vue-site | |
| path: _site | |
| retention-days: 5 | |
| report: | |
| if: always() | |
| needs: | |
| - tdesign-vue | |
| - tdesign-vue-next | |
| - tdesign-react | |
| # - tdesign-web-components | |
| - tdesign-mobile-vue | |
| - tdesign-mobile-react | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: jobs report | |
| id: report | |
| uses: actions/github-script@v9 | |
| with: | |
| script: | | |
| const pr_id = ${{ github.event.number }}; | |
| const { data: { jobs } } = await github.rest.actions.listJobsForWorkflowRun({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| run_id: context.runId, | |
| per_page: 100 | |
| }) | |
| const ciJob = { | |
| lint_status: "", | |
| lint_job: "", | |
| test_status: "", | |
| test_job: "", | |
| build_status: "", | |
| build_job: "", | |
| preview_status: "", | |
| preview_job: "", | |
| }; | |
| const tdesign = { | |
| "tdesign-vue": { ...ciJob }, | |
| "tdesign-vue-next": { ...ciJob }, | |
| "tdesign-react": { ...ciJob }, | |
| //"tdesign-web-components": { ...ciJob }, | |
| "tdesign-mobile-vue": { ...ciJob }, | |
| "tdesign-mobile-react": { ...ciJob }, | |
| }; | |
| jobs | |
| .filter((job) => job.name.startsWith("tdesign-")) | |
| .map((job) => { | |
| const status = job.conclusion === "success" ? "✅" : "❌"; | |
| // job.name 'tdesign-vue (build)' | |
| const regex = /^(\S+)\s+\((\S+)\)$/; | |
| const match = job.name.match(regex); | |
| tdesign[match[1]][`${match[2]}_status`] = status; | |
| tdesign[match[1]][`${match[2]}_job`] = job.html_url; | |
| if (match[2] === "preview" && job.conclusion === "success") { | |
| tdesign[match[1]][`${match[2]}_status`] = "👀"; | |
| const html_url = `https://preview-${match[1]}-pr-${pr_id}-tdesign-common.surge.sh` | |
| tdesign[match[1]][`${match[2]}_job`] = html_url; | |
| } | |
| }); | |
| const runUrl = `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`; | |
| const report = ` | |
| # TDesign Component Repositories CI Test [Open](${runUrl}) | |
| | Component | Lint | Test | Build | Preview | | |
| | --------- | :--: | :--: | :----: | :----: | | |
| ${Object.keys(tdesign) | |
| .map((component) => { | |
| const lint_text = `[${tdesign[component].lint_status}](${tdesign[component].lint_job})`; | |
| const test_text = `[${tdesign[component].test_status}](${tdesign[component].test_job})`; | |
| const build_text = `[${tdesign[component].build_status}](${tdesign[component].build_job})`; | |
| const preview_text = `[${tdesign[component].preview_status}](${tdesign[component].preview_job})`; | |
| return `| ${component} | ${lint_text} | ${test_text} | ${build_text} | ${preview_text} |`; | |
| }) | |
| .join("\n")} | |
| `; | |
| require('fs').writeFileSync('report.txt', report); | |
| - run: echo ${{ github.event.number }} > pr-id.txt | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: pr-id | |
| path: pr-id.txt | |
| retention-days: 5 | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: report | |
| path: report.txt | |
| retention-days: 5 |