The GistPin CI pipeline has been restructured from a sequential model to a fully parallelized architecture. This document describes the optimization strategy, parallelization approach, caching layers, and expected time reduction metrics.
| Group | Jobs | Parallelism |
|---|---|---|
| Lint & TypeCheck | lint, typecheck |
Run in parallel immediately |
| Test Matrix | Unit tests across node versions and OS | Matrix strategy with fail-fast: false |
| Integration | E2E and integration test suites | Run after lint/typecheck complete |
| Security | Trivy vulnerability scan | Run after lint/typecheck complete |
| Visualization | Pipeline report generation | Run after all test stages complete |
As defined in matrix-config.json, the test matrix covers:
- Node versions: 18, 20, 22
- OS targets: ubuntu-latest
- Test suites: unit, integration, e2e
Matrix dimensions are configurable via GitHub Actions variables (NODE_VERSIONS, OS_TARGETS) for different branches or environments.
Key: ${{ runner.os }}-node${{ matrix.node-version }}-npm-${{ hashFiles('**/package-lock.json') }}
Paths: ~/.npm, **/node_modules
Key: ${{ runner.os }}-buildx-${{ github.sha }}
Paths: /tmp/.buildx-cache
Test results and coverage reports are uploaded as GitHub Actions artifacts with 14-day retention.
| Metric | Sequential | Parallel | Reduction |
|---|---|---|---|
| Total wall time | ~45 min | ~18 min | 60% |
| Lint + TypeCheck | 8 min | 4 min | 50% |
| Test matrix (3 versions) | 21 min | 7 min | 67% |
| Integration + Security | 16 min | 10 min | 38% |
The parallel pipeline is defined in infrastructure/ci/parallel-pipeline.yml. It is triggered on:
- Push to
main - Pull requests
- Manual dispatch via
workflow_dispatch
| Variable | Default | Description |
|---|---|---|
NODE_VERSIONS |
[18,20,22] |
JSON array of node versions for matrix |
OS_TARGETS |
["ubuntu-latest"] |
JSON array of OS targets for matrix |
- Fail-fast disabled: Matrix builds continue across all versions even if one fails, providing full test coverage feedback.
- Independent stages: Lint and typecheck run first; test, integration, and security run in parallel after they complete.
- Cache key granularity: Cache keys include node version and OS to prevent cross-contamination.
- Visualization: A final pipeline stage generates a status report, making it easy to identify failing dimensions.