[STG-1232] Speed up PR Github Actions checks, add code coverage, fix e2e bb tests running not running in bb mode#1600
[STG-1232] Speed up PR Github Actions checks, add code coverage, fix e2e bb tests running not running in bb mode#1600
Conversation
|
Greptile SummaryReplaced monolithic vitest execution with parallel test runs by introducing a matrix strategy that discovers test files dynamically and runs each
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant DC as determine-changes
participant DB as run-build
participant DT as discover-core-tests
participant CU as core-unit-tests
participant E2E as run-e2e-*-tests
DC->>DB: core == 'true'
DC->>DT: core == 'true'
Note over DT: Find all *.test.ts files<br/>in packages/core/tests
DT->>DT: Build JSON matrix array<br/>of test files
DT->>DT: Set outputs:<br/>core-tests, has-core-tests
DB->>DB: Build packages
DB->>DB: Upload build artifacts
DT-->>CU: has-core-tests == 'true'
DB-->>CU: Provides build artifacts
Note over CU: Matrix strategy creates<br/>parallel jobs for each test
par Test File 1
CU->>CU: Setup environment
CU->>CU: Download build artifacts
CU->>CU: vitest run test1.test.ts
and Test File 2
CU->>CU: Setup environment
CU->>CU: Download build artifacts
CU->>CU: vitest run test2.test.ts
and Test File N
CU->>CU: Setup environment
CU->>CU: Download build artifacts
CU->>CU: vitest run testN.test.ts
end
CU-->>E2E: All tests complete
Note over E2E: E2E tests run after<br/>build completes
|
There was a problem hiding this comment.
No issues found across 1 file
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Architecture diagram
sequenceDiagram
participant GH as GitHub Actions
participant Disc as Job: discover-core-tests
participant Worker as Job: core-unit-tests (Matrix)
participant Store as Artifacts & Cache
Note over GH,Store: CHANGED: Parallelization Strategy
GH->>Disc: Trigger if core changed
Note right of Disc: Shell Script Execution
Disc->>Disc: NEW: find ./tests -name "*.test.ts"
Disc->>Disc: NEW: Construct JSON array [{path, name}...]
Disc-->>GH: Output: core-tests JSON
GH->>GH: Parse JSON & Expand Matrix
par NEW: Parallel Execution
GH->>Worker: Spawn Worker 1 (Test A)
GH->>Worker: Spawn Worker N (Test B)
end
Note right of Worker: Runs concurrently per file
loop Setup & Run
Worker->>Store: Restore pnpm store (Cache)
Worker->>Store: Download 'build-artifacts'
Store-->>Worker: lib/ files
Worker->>Worker: NEW: vitest run [matrix.test.path]
alt Test Fails
Worker-->>GH: Mark job failed
Note over Worker,GH: fail-fast: false (Other workers continue)
else Test Passes
Worker-->>GH: Mark job success
end
end
…fy chrome launches before running tests
388a1e6 to
6c906c8
Compare
3668b1f to
524f87e
Compare
why
what changed
Summary by cubic
Run Vitest and Playwright E2E tests for packages/core in parallel by discovering each file and running them as matrix jobs. Evals reuse the shared build and run after Browserbase E2E to avoid contention, with CI-enforced timeouts for LLM and Browserbase to keep runs fast, and publish CTRF reports and V8 coverage to Insights.
Written for commit 80fad7e. Summary will update on new commits. Review in cubic