ci: add source-first fast-check gate before build promotion
This commit is contained in:
@@ -390,8 +390,9 @@ pre-commit run end-of-file-fixer --all-files
|
||||
|
||||
The CI/CD pipeline uses a **multi-stage build architecture** for optimal performance:
|
||||
|
||||
- **Stage 1**: Build base image (system dependencies, Python, Node.js) - **cached across runs**
|
||||
- **Stage 2**: Build complete image (project code and dependencies) - **rebuilt every time**
|
||||
- **Stage 1**: Source-level fast checks (format, lint, type-check) - **hard promotion gate**
|
||||
- **Stage 2**: Build base image (system dependencies, Python, Node.js) - **cached across runs**
|
||||
- **Stage 3**: Build complete image (project code and dependencies) - **rebuilt every time**
|
||||
|
||||
Pipeline triggers:
|
||||
|
||||
@@ -425,26 +426,19 @@ For detailed technical information, see [CI/CD Multi-Stage Build Architecture](C
|
||||
|
||||
All jobs run in parallel after the setup phases:
|
||||
|
||||
1. **Setup Base**: Builds and pushes base Docker image (conditional)
|
||||
2. **Setup Complete**: Builds and pushes complete CI/CD Docker image
|
||||
3. **Code Quality**:
|
||||
- Trailing whitespace check
|
||||
- End-of-file formatting
|
||||
- YAML syntax validation
|
||||
- TOML syntax validation
|
||||
4. **Backend Validation**:
|
||||
- Ruff formatting check
|
||||
- Ruff linting
|
||||
- Pyright type checking
|
||||
- Darglint docstring validation
|
||||
- Unit tests with coverage
|
||||
- Integration tests
|
||||
- Doctests (xdoctest)
|
||||
5. **Frontend Validation**:
|
||||
- Prettier formatting check
|
||||
- ESLint linting
|
||||
- TypeScript compilation
|
||||
- Unit tests with coverage
|
||||
1. **Source Fast Gate**:
|
||||
Backend source checks (Ruff format/lint, Pyright), frontend source checks (Prettier, ESLint, TypeScript), and dispatches downstream build only on success.
|
||||
|
||||
2. **Setup Base**: Builds and pushes base Docker image (conditional)
|
||||
3. **Setup Complete**: Builds and pushes complete CI/CD Docker image
|
||||
4. **Code Quality**:
|
||||
Trailing whitespace check, end-of-file formatting, YAML syntax validation, and TOML syntax validation.
|
||||
|
||||
5. **Backend Validation**:
|
||||
Ruff formatting check, Ruff linting, Pyright type checking, Darglint docstring validation, unit tests with coverage, integration tests, and doctests (xdoctest).
|
||||
|
||||
6. **Frontend Validation**:
|
||||
Prettier formatting check, ESLint linting, TypeScript compilation, and unit tests with coverage.
|
||||
- E2E tests (Playwright)
|
||||
|
||||
### Local CI/CD Testing
|
||||
|
||||
Reference in New Issue
Block a user