← 所有代码文件

.github/workflows/ci.yml

GitHub Actions:每次 push 和 PR 时安装、lint、测试和构建。

name: CI

on:
  push:
    branches: [main]
  pull_request:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 22
          cache: npm
      - run: npm ci
      - run: npm run lint --if-present
      - run: npm test --if-present
      - run: npm run build --if-present

关于此工具

GitHub Actions:每次 push 和 PR 时安装、lint、测试和构建。

开箱即用的 .github/workflows/ci.yml——查看内容、复制,或以正确的文件名下载。免费,100% 在浏览器中运行。