cloud-drive-renamer/.github/workflows/complete-tests.yml
Zain 4b224761b6 refactor(ci): 优化 CI 流程并精简 npm scripts
docs: 添加 SCRIPTS.md 文档说明新命令集
style: 添加代码注释说明性能指标和 polyfill 状态
ci: 合并测试步骤为单一命令并优化构建验证
2025-12-16 17:58:20 +08:00

71 行
1.5 KiB
YAML

# ==========================================
# GitHub Actions Workflow: Complete Test Suite
# ==========================================
#
# 功能:运行完整的测试套件(包括性能测试)
#
# 触发条件:
# - 手动触发
# - 每周定时运行
# - Release 标签
#
# 时长:约 5-10 分钟
#
# ==========================================
name: Complete Tests
# 触发条件
on:
# 手动触发
workflow_dispatch:
# 每周一早上运行
schedule:
- cron: '0 0 * * 1'
# Release 标签触发
push:
tags:
- 'v*.*.*'
# 环境变量
env:
NODE_VERSION: '20'
jobs:
complete-tests:
name: Complete Test Suite
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: 📥 Checkout repository
uses: actions/checkout@v4
- name: 🔧 Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- name: 📦 Install dependencies
run: npm ci
# 运行完整的质量检查和测试
- name: 🚀 Run complete CI suite
run: npm run ci
continue-on-error: false
# 可选:运行 E2E 测试
- name: 🎭 Run E2E tests
run: npm run test:e2e
continue-on-error: true # E2E 测试失败不阻止流程
- name: ✅ All tests completed
run: |
echo "✅ Complete test suite passed!"
echo "- ✅ Quality checks (lint, typecheck, tests)"
echo "- ✅ Build verification"
echo "- 🎭 E2E tests (optional)"