Add GitHub Actions CI: lint, typecheck, tests and build on PRs to master
Runs on every pull request to master and on push to master (Node 22, npm ci, CI=true). The gitea deploy workflow is unchanged. README describes the check and recommends making it required for master. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
34
.github/workflows/ci.yml
vendored
Normal file
34
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [master]
|
||||
push:
|
||||
branches: [master]
|
||||
|
||||
concurrency:
|
||||
group: ci-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
checks:
|
||||
name: lint, typecheck, test, build
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
env:
|
||||
CI: true
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
cache: npm
|
||||
|
||||
# .npmrc задаёт legacy-peer-deps=true (react-scripts 5 + TypeScript 5)
|
||||
- run: npm ci
|
||||
|
||||
- run: npm run lint
|
||||
- run: npm run typecheck
|
||||
- run: npm run test:ci
|
||||
- run: npm run build
|
||||
Reference in New Issue
Block a user