mirror of
https://github.com/langgenius/dify.git
synced 2026-05-26 11:57:40 +08:00
Co-authored-by: GareArc <garethcxy@dify.ai> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: L1nSn0w <l1nsn0w@qq.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: gigglewang <gigglewang@dify.ai> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Co-authored-by: Xiyuan Chen <52963600+GareArc@users.noreply.github.com>
47 lines
1.0 KiB
YAML
47 lines
1.0 KiB
YAML
name: CLI Tests
|
|
|
|
on:
|
|
workflow_call:
|
|
secrets:
|
|
CODECOV_TOKEN:
|
|
required: false
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: cli-tests-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
test:
|
|
name: CLI Tests
|
|
runs-on: depot-ubuntu-24.04
|
|
env:
|
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
working-directory: ./cli
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Setup web environment
|
|
uses: ./.github/actions/setup-web
|
|
|
|
- name: CI pipeline (typecheck, lint, coverage, build)
|
|
run: pnpm ci
|
|
|
|
- name: Report coverage
|
|
if: ${{ env.CODECOV_TOKEN != '' }}
|
|
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
|
|
with:
|
|
directory: cli/coverage
|
|
flags: cli
|
|
env:
|
|
CODECOV_TOKEN: ${{ env.CODECOV_TOKEN }}
|