mirror of
https://github.com/labring/FastGPT.git
synced 2026-05-08 01:08:43 +08:00
ac36cad6d9
* fix: switch user_main invocation to use keyword arguments for better default parameter handling * fix: test --------- Co-authored-by: archer <545436317@qq.com>
46 lines
996 B
YAML
46 lines
996 B
YAML
name: 'Sandbox-Test'
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'projects/code-sandbox/**'
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
|
|
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 }}
|
|
|
|
- uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 9
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
cache: 'pnpm'
|
|
|
|
- uses: oven-sh/setup-bun@v2
|
|
with:
|
|
bun-version: latest
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Install Dependencies
|
|
run: pnpm install
|
|
|
|
- name: Install Python Dependencies
|
|
run: pip install -r projects/code-sandbox/requirements.txt
|
|
|
|
- name: Run Unit Tests
|
|
run: pnpm --filter=code-sandbox test
|