# 前端类型检查 + 单元测试（push master/feat/* 或向 master 发 PR 时触发）
name: Push & PR Check

on:
  push:
    branches: [master, 'feat/**']
  pull_request:
    branches: [master]

jobs:
  check:
    runs-on: windows
    steps:
      - uses: actions/checkout@v4

      - uses: pnpm/action-setup@v4
        with:
          version: 9

      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: '20'
          cache: 'pnpm'

      - run: pnpm install --frozen-lockfile
      - run: pnpm typecheck
      - run: pnpm test
