Skip to content

工程化:配置 GitHub CI #44

@minorcell

Description

@minorcell

问题描述

项目没有配置 GitHub CI/CD,导致:

  • 每次合并前无法自动检查代码质量
  • 无法自动运行 TypeScript 类型检查
  • 无法自动运行 lint
  • 构建问题只能在本地发现

建议方案

添加 .github/workflows/ci.yml

name: CI

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: '20'
          cache: 'npm'
      - run: npm ci
      - run: npm run lint
      - run: npx tsc --noEmit
      - run: npm run build

相关 Issue(建议关闭)


本 Issue 由 Memo Code 生成。

@hjx2289206 @AlkaidSTART

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions