feat(marketplace): support community plugins and uninstall flow #1279
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: "FastGPT-Pro-Test" | |
| on: | |
| pull_request_target: | |
| types: [ opened, synchronize, reopened ] | |
| paths: | |
| - "pro" | |
| - "pro/**" | |
| - "packages/global/**" | |
| - "packages/service/**" | |
| - "packages/web/**" | |
| - "sdk/otel/**" | |
| - "sdk/storage/**" | |
| - "package.json" | |
| - "pnpm-lock.yaml" | |
| - "pnpm-workspace.yaml" | |
| - "tsconfig.json" | |
| - "vitest.config.mts" | |
| - "eslint.config.mjs" | |
| - "turbo.json" | |
| - ".npmrc" | |
| - ".gitmodules" | |
| - ".github/workflows/test-fastgpt-pro.yaml" | |
| workflow_dispatch: | |
| concurrency: | |
| group: "fastgpt-pro-test-${{ github.event.pull_request.number || github.ref }}" | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| if: ${{ github.event_name != 'pull_request_target' || | |
| contains(fromJSON('["COLLABORATOR", "OWNER"]'), | |
| github.event.pull_request.author_association) }} | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event_name == 'pull_request_target' && | |
| github.event.pull_request.head.sha || github.ref }} | |
| repository: ${{ github.event_name == 'pull_request_target' && | |
| github.event.pull_request.head.repo.full_name || github.repository | |
| }} | |
| - name: Update submodules | |
| env: | |
| PRO_SUBMODULE_TOKEN: ${{ secrets.PRO_SUBMODULE_TOKEN }} | |
| run: | | |
| if [ -f .gitmodules ]; then | |
| if [ -z "${PRO_SUBMODULE_TOKEN}" ]; then | |
| echo "::error::PRO_SUBMODULE_TOKEN is required to clone the private pro submodule. Add it to this repository's Actions secrets, or run this workflow from a repository that has the secret configured." | |
| exit 1 | |
| fi | |
| if [ -n "${PRO_SUBMODULE_TOKEN}" ]; then | |
| git config --global url."https://x-access-token:${PRO_SUBMODULE_TOKEN}@github.com/".insteadOf "https://github.com/" | |
| fi | |
| git submodule update --init --recursive --jobs 8 | |
| fi | |
| - name: Install system deps for node-canvas | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "24" | |
| cache: "pnpm" | |
| - name: Install Deps | |
| run: pnpm install --frozen-lockfile | |
| - name: Test | |
| env: | |
| INVOKE_TOKEN_SECRET: fastgpt_test_invoke_token_secret_32 | |
| run: pnpm test:admin | |
| - name: Report Coverage | |
| if: always() && hashFiles('pro/admin/coverage/coverage-summary.json') != '' | |
| uses: davelosert/vitest-coverage-report-action@v2 | |
| with: | |
| json-final-path: pro/admin/coverage/coverage-final.json | |
| json-summary-path: pro/admin/coverage/coverage-summary.json |