diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..6ab8730 --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,39 @@ +name: CI + +on: + push: + branches: [main, master] + pull_request: + +permissions: + contents: read + +jobs: + verify: + runs-on: ubuntu-latest + timeout-minutes: 15 + + steps: + - name: 检出代码 + uses: actions/checkout@v4 + + - name: 准备 Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: npm + + - name: 安装依赖 + run: npm ci + + - name: 代码检查 + run: npm run lint + + - name: 类型检查 + run: npm run typecheck + + - name: 单元测试 + run: npm run test + + - name: 生产构建 + run: npm run build