Skip to content

feat: 新增独立 Qwen-MT 翻译服务 #42

feat: 新增独立 Qwen-MT 翻译服务

feat: 新增独立 Qwen-MT 翻译服务 #42

Workflow file for this run

name: CI
on:
pull_request:
push:
branches: [main]
workflow_dispatch:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
app:
name: App checks (i18n / unit tests / build)
runs-on: ubuntu-22.04
timeout-minutes: 30
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20.14.0
cache: yarn
# CI=true 时 postinstall 的 ensure-native 会自动跳过原生依赖下载;
# yarn build(--no-pack)不依赖 addon.node / sherpa 原生库,无需 fetch。
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Check i18n key parity
run: yarn check:i18n
- name: Unit tests (engines)
run: yarn test:engines
- name: Unit tests (AI response parser)
run: yarn test:translate-parser
- name: Unit tests (glossary)
run: yarn test:glossary
- name: Unit tests (structured output fallback)
run: yarn test:structured-output
- name: Unit tests (translation cancel)
run: yarn test:translation-cancel
- name: Unit tests (Qwen-MT)
run: yarn test:qwen-mt
# 配音功能与 test:dubbing 脚本随 3.4.0 开发分支引入,尚未合入 main;
# 用 --if-present 让脚本存在才执行,避免 workflow 引用未合并脚本导致 main 恒红,
# 配音分支合入后本步骤自动生效、无需改 workflow。
- name: Unit tests (dubbing)
run: npm run test:dubbing --if-present
- name: Compile application (renderer + main)
run: yarn build
docs:
name: Docs build (Docusaurus)
runs-on: ubuntu-22.04
timeout-minutes: 15
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20.14.0
cache: yarn
cache-dependency-path: docs/yarn.lock
- name: Install docs dependencies
working-directory: docs
run: yarn install --frozen-lockfile
- name: Build docs site
working-directory: docs
run: yarn build