mirror of
https://github.com/labring/FastGPT.git
synced 2026-05-07 01:02:55 +08:00
289da0f7b0
* sandbox-sync-agent * refactor: host pro as submodule * chore: checkpoint host pro restructure * refactor workspace test layout and startup init * chore: update next turbopack setup * chore: snapshot current work before actions fix * chore: update pro submodule * chore: point pro submodule url to upstream https * fix: Dockerfile * chore: update pro submodule * ci: support private pro submodule token and skip fork jobs * fix(ci): build sdk workspace deps before code-sandbox bundle * fix(app): exclude vitest configs from production typecheck * fix(app-image): build sdk packages before next build * fix(ci): align dockerfiles with workspace sdk build flow * chore(docker): upgrade node20 docker images to node24 * fix(ci): read admin coverage output path in pro test workflow * fix(app-image): include next-i18next config and locale assets * chore: update pro submodule * chore: do not specify branch for submodule * chore: remove most ts-nocheck sign * chore: update pro submodule * chore: remove sandbox-agent-sync package * chore: do not modify "pushData" file logic * fix: health check * chore: restore dev axios proxy state * fix: test-fastgpt report workflow * fix: use valid vitest coverage action inputs
55 lines
1.9 KiB
YAML
55 lines
1.9 KiB
YAML
name: 'FastGPT-Pro-Test'
|
|
on:
|
|
pull_request:
|
|
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' || github.event.pull_request.head.repo.full_name == github.repository || secrets.PRO_SUBMODULE_TOKEN != '' }}
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
contents: read
|
|
pull-requests: write
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.ref || github.ref }}
|
|
repository: ${{ 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 [ -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
|
|
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
|
|
with:
|
|
version: 10.33.2
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
cache: 'pnpm'
|
|
- name: Install Deps
|
|
run: pnpm install --frozen-lockfile
|
|
- name: Test
|
|
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
|