eb8b999ce5
- 为 push 和 pull_request 事件补充 docs、Issue 模板、发布配置、AI 评审忽略文件和 LICENSE 等路径的忽略规则。 - 同步为 AI PR Review 工作流增加相同的路径忽略,减少无关变更触发。
72 lines
1.5 KiB
YAML
72 lines
1.5 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths-ignore:
|
|
- "**/*.md"
|
|
- "docs/**"
|
|
- ".github/ISSUE_TEMPLATE/**"
|
|
- ".github/release.yml"
|
|
- ".ai-reviewignore"
|
|
- "LICENSE"
|
|
- "deploy/.env.example"
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
paths-ignore:
|
|
- "**/*.md"
|
|
- "docs/**"
|
|
- ".github/ISSUE_TEMPLATE/**"
|
|
- ".github/release.yml"
|
|
- ".ai-reviewignore"
|
|
- "LICENSE"
|
|
- "deploy/.env.example"
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
checks:
|
|
name: Check web and api
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 10.28.2
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: pnpm
|
|
cache-dependency-path: pnpm-lock.yaml
|
|
|
|
- name: Install web dependencies
|
|
run: pnpm install --frozen-lockfile --filter lanqin-email-web...
|
|
|
|
- name: Check shadcn/ui usage
|
|
run: pnpm --dir apps/web run check:shadcn
|
|
|
|
- name: Build web
|
|
run: pnpm --dir apps/web run build
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: apps/api/go.mod
|
|
cache-dependency-path: apps/api/go.sum
|
|
|
|
- name: Test api
|
|
working-directory: apps/api
|
|
run: go test ./...
|