This guide explains how to reproduce, diagnose, and resolve GitHub Actions CI failures locally before requesting maintainer review for the Aegis SDK.
Aegis SDK uses GitHub Actions (.github/workflows/runtime-compatibility.yml) to verify type safety, unit test pass rates, and Node.js version compatibility (Node 20 and Node 22).
A passing CI run is required for code review and PR approval. Maintainers will not review or merge pull requests with failing CI status. PRs with unresolved CI failures may be delayed or closed if there is no active communication from the author.
- SDK Stability: Aegis SDK acts as middleware for the Aegis RWA Protocol. Test failures or type errors can break downstream integration.
- Node.js Matrix Support: Automated checks verify runtime compatibility across Node 20 and Node 22.
- Review Efficiency: Clean CI passes ensure PRs are ready for functional review.
Run these commands locally to reproduce and verify CI checks before pushing:
| Target | Command | Description |
|---|---|---|
| Full Release Gate | npm run check |
Runs build, unit tests in band, and compatibility checks. |
| TypeScript Build | npm run build |
Compiles TypeScript (tsc) and checks for type errors. |
| Unit Tests | npm test |
Runs Jest unit tests under tests/. |
| Runtime Compatibility | npm run test:compat |
Executes scripts/check-compat.mjs export probes. |
| Linting | npm run lint |
Runs ESLint on src/**/*.ts. |
| Code Formatting | npm run format |
Runs Prettier write on TypeScript files. |
- Symptom: Build step fails with
TS2304,TS2345, or signature mismatch errors. - Resolution: Run
npm run buildlocally, resolve missing imports or type mismatches, and confirm exported types matchdocs/api-reference.md.
- Symptom: Jest suite fails on assertions under
tests/. - Resolution: Run
npm test -- --runInBandlocally. For Soroban/Stellar contract calls, use the mock client from@aegis/sdk/testingas described indocs/testing.md.
- Symptom: The
Run release compatibility gatestep fails onscripts/check-compat.mjs. - Resolution: Run
npm run build && npm run test:compat. Verify thatpackage.jsonentry points (main,types,exports) match generated artifacts indist/.
- Symptom: ESLint reports syntax or unformatted code violations.
- Resolution: Run
npm run lintto inspect issues andnpm run formatto apply formatting rules.
- Symptom: CI fails during dependency setup or script execution.
- Resolution: Install dependencies using the same flags CI uses:
npm install --ignore-scripts --no-audit --no-fund
When a pull request check fails:
- Check Log Output: Click Details on the failed GitHub Actions job and view the step output log.
- Reproduce Locally: Checkout your branch locally and run
npm run check. - Fix and Re-test: Apply necessary code or type fixes and re-run
npm run checkuntil it passes. - Push Updates: Commit your changes and push to your feature branch to trigger a new CI run.
- Verify Job Status: Confirm all matrix jobs on GitHub show a passing status before requesting review.
Before requesting review:
-
npm run buildpasses cleanly. -
npm testpasses all unit tests. -
npm run test:compatpasses compatibility checks. -
npm run checkcompletes without errors locally. - All GitHub Actions matrix checks pass on the pull request.