A push to develop/main runs after the fact for direct pushes, and a push to main specifically only happens once Gitea has already created the merge commit — too late to gate anything. The only trigger that runs before the "Merge" button becomes clickable is pull_request. Simplifies the previous push-only setup (which technically also worked via SHA-based status checks, but was confusing to reason about) down to the one trigger that matches intent directly. Note: the required status check name on main's branch protection will need updating in the Gitea UI to match the new context (something like "CI / quality (pull_request)" instead of "CI / quality (push)"). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
40 lines
1.2 KiB
YAML
40 lines
1.2 KiB
YAML
name: CI
|
|
|
|
on:
|
|
# Tourne uniquement sur la Pull Request, avant le clic sur "Merge" (seul moment ou un check peut
|
|
# encore bloquer la fusion). Un "push" sur main declenche par le merge lui-meme arriverait trop
|
|
# tard pour bloquer quoi que ce soit.
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
quality:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
# node:sqlite (coachStore.ts, memory/store.ts, meetingStore.ts) exige Node >= 22.5, mais
|
|
# Vite/Rolldown ne le reconnaissent comme built-in qu'a partir de Node 24 (absent de
|
|
# module.builtinModules avant, bien que isBuiltin() le reconnaisse deja) : sous Node 22,
|
|
# la transformation plante avec "Cannot bundle Node.js built-in node:sqlite".
|
|
node-version: '24'
|
|
cache: 'npm'
|
|
|
|
- name: Install dependencies
|
|
run: npm ci --ignore-scripts
|
|
|
|
- name: TypeScript check
|
|
run: npm run typecheck
|
|
|
|
- name: ESLint
|
|
run: npm run lint
|
|
|
|
- name: Unit tests + coverage
|
|
run: npm run test:coverage
|
|
|
|
- name: Security audit
|
|
run: npm audit --audit-level=high
|