Skip to content

Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.

ci: test for pro version

白熱c9d8944c7150
diff --git a/.github/workflows/ci-test-pro.yml b/.github/workflows/ci-test-pro.yml
new file mode 100644
index 0000000000..01fe9479c8
--- /dev/null
+++ b/.github/workflows/ci-test-pro.yml
@@ -0,0 +1,84 @@
+name: 🔫 CI Test (pro version)
+
+on:
+ workflow_run:
+ workflows:
+ - 📦 Build
+ types: [completed]
+
+permissions:
+ contents: read
+ pull-requests: write
+
+jobs:
+ setup:
+ if: ${{ github.event.workflow_run.conclusion == 'success' }}
+ runs-on: ubuntu-latest
+
+ outputs:
+ id: ${{ steps.pr.outputs.value }}
+ ref: ${{ steps.ref.outputs.value }}
+ repo: ${{ steps.repo.outputs.value }}
+
+ steps:
+ # Get PR id from artifact
+ - name: download pr artifact
+ uses: dawidd6/action-download-artifact@v2
+ with:
+ workflow: ${{ github.event.workflow_run.workflow_id }}
+ run_id: ${{ github.event.workflow_run.id }}
+ name: pr-id
+
+ - name: get PR id
+ id: pr
+ run: echo "value=$(<pr-id.txt)" >> $GITHUB_OUTPUT
+
+ # Get PR ref from artifact
+ - name: download pr artifact
+ uses: dawidd6/action-download-artifact@v2
+ with:
+ workflow: ${{ github.event.workflow_run.workflow_id }}
+ run_id: ${{ github.event.workflow_run.id }}
+ name: pr-ref
+
+ - name: get PR ref
+ id: ref
+ run: echo "value=$(<pr-ref.txt)" >> $GITHUB_OUTPUT
+
+ # Get PR repo from artifact
+ - name: download pr artifact
+ uses: dawidd6/action-download-artifact@v2
+ with:
+ workflow: ${{ github.event.workflow_run.workflow_id }}
+ run_id: ${{ github.event.workflow_run.id }}
+ name: pr-repo
+
+ - name: get PR repo
+ id: repo
+ run: echo "value=$(<pr-repo.txt)" >> $GITHUB_OUTPUT
+
+ test-pro:
+ runs-on: ubuntu-latest
+ needs: [setup]
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ with:
+ repository: dream-num/univer-pro
+ token: ${{ secrets.GH_TOKEN }}
+ submodules: true
+
+ - name: Setup Node.js
+ uses: ./.github/actions/setup-node
+
+ - name: Update submodules (univer)
+ run: |
+ cd submodules/univer
+ git checkout dev
+ git pull
+ cd ../../
+ pnpm i
+
+ - name: 🩺 Run test
+ run: pnpm coverage
diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml
index 94c1ac9379..29195fdae3 100644
--- a/.github/workflows/ci-test.yml
+++ b/.github/workflows/ci-test.yml
@@ -22,7 +22,7 @@ jobs:
uses: ./.github/actions/setup-node
- name: 🩺 Run test
- run: pnpm run coverage
+ run: pnpm coverage
# TODO: cross fork PR will not trigger this action
- name: 🧬 Report coverage