Files
aitu/.github/workflows/ci.yml
T
liquidliang 69233ddb7a refactor(utils): 重构工具模块并迁移共享代码到独立包
feat(utils): 添加数组、字符串、异步工具函数和测试
feat(utils): 实现日志、编码和类型工具模块
fix(web): 修复Service Worker缓存策略和CSP头
ci: 添加bundle大小检查工作流
build: 添加size-limit依赖和配置
perf(web): 优化vite分包策略
2026-01-07 15:03:10 +08:00

55 lines
1.5 KiB
YAML

name: CI
on:
push:
branches:
- main
pull_request:
permissions:
actions: read
contents: read
jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
# Connect your workspace on nx.app and uncomment this to enable task distribution.
# The "--stop-agents-after" is optional, but allows idle agents to shut down once the "e2e-ci" targets have been requested
# - run: npx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="e2e-ci"
# Cache node_modules
- uses: actions/setup-node@v3
with:
node-version: 20
cache: 'npm'
- run: npm ci
- uses: nrwl/nx-set-shas@v4
# 安装 Playwright 浏览器和依赖
- name: Install Playwright
run: npx playwright install --with-deps
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - run: npx nx-cloud record -- echo Hello World
- run: npx nx affected -t test build --base=origin/develop --verbose
- run: npx nx affected -t lint --exclude=drawnix --base=origin/develop --verbose
- run: npx nx affected --parallel 1 -t e2e-ci --base=origin/develop --verbose
- name: Check Bundle Size
if: always()
run: pnpm run size
- name: Upload Bundle Stats
if: always()
uses: actions/upload-artifact@v4
with:
name: bundle-stats
path: dist/apps/web/stats.html