Stop ignoring .github and add CI workflow#128
Stop ignoring .github and add CI workflow#128austinm2h35-sketch wants to merge 9 commits intomainfrom
Conversation
…/step-2-build-tests Conflict resolution so that platform-build-and-test runs without issue
|
@jrb00013 After several fixes I'm now at the root cause of the failure. The root matrix CI runs as it should, but it looks like several submodules are failing because they depend on shared code outside their own src directories, which TypeScript enforces under rootDir. As far as I can tell, fixing this would require either expanding each submodule’s tsconfig to include shared code or restructuring shared-utils as a proper package/monorepo component. Before making any architectural changes, I wanted to check in and get your guidance on the preferred direction. |
|
@austinm2h35-sketch will get to this eventually |
jrb00013
left a comment
There was a problem hiding this comment.
Fix CI Build Failures for Submodules
Problem Analysis
The CI is failing because:
Submodules have rootDir: "./src" in their tsconfig.json, which enforces that all source files must be under the src directory
Submodules import from @deepiri/shared-utils which is located outside their directory structure
The CI workflow doesn't build shared-utils before building submodules
Inconsistent package.json paths to shared-utils across submodules
Solution Approach
- Update CI Workflow
Update .github/workflows/platform-build-and-test.yml to:
Build shared-utils first as a separate job
Make shared-utils available to submodule build jobs (via artifacts or by ensuring it's in the correct location)
Ensure submodules can resolve the shared-utils dependency during build
2. Standardize Package.json Paths
Fix inconsistent paths in submodule package.json files:
All submodules in platform-services/backend/* should use: "@deepiri/shared-utils": "file:../../shared/deepiri-shared-utils"
Update failing submodules: deepiri-api-gateway, deepiri-external-bridge-service, etc.
3. Fix TypeScript Configurations
For submodules that import shared-utils:
Option A: Remove rootDir from tsconfig.json (TypeScript will infer it from include)
Option B: Keep rootDir but ensure shared-utils is built and installed as a dependency (preferred)
4. Files to Modify
CI Workflow:
.github/workflows/platform-build-and-test.yml - Add shared-utils build job and ensure proper dependency resolution
Package.json files (standardize paths):
platform-services/backend/deepiri-api-gateway/package.json - Fix path from file:../shared-utils to file:../../shared/deepiri-shared-utils
platform-services/backend/deepiri-external-bridge-service/package.json - Fix path
platform-services/backend/deepiri-auth-service/package.json - Fix path from absolute to relative
Other failing submodules as needed
TypeScript Config (if needed):
Consider removing rootDir from submodules that import shared-utils, or ensure shared-utils is properly built before submodule builds
Implementation Strategy
CI Workflow Changes:
Add a build-shared-utils job that runs before submodule builds
Build and package shared-utils
Make it available to submodule jobs (either via artifacts or by ensuring the directory structure is correct)
Update submodule build steps to ensure shared-utils is accessible
Path Standardization:
Audit all submodule package.json files
Standardize to relative paths: file:../../shared/deepiri-shared-utils for backend services
Update any absolute paths to relative paths
TypeScript Configuration:
If rootDir causes issues even after shared-utils is built, remove it and let TypeScript infer from include patterns
This is safe because the output structure is controlled by outDir
Expected Outcome
All submodule builds pass in CI
Consistent dependency resolution across all services
Shared-utils is built once and reused by all submodules
|
every single service, and if the service has a separate Git repo, then you have to configure the secrets in there as well. In the settings of the repo, creating a secret. @runbin @SnakesMenace take note |
|
@austinm2h35-sketch You got this! |
Phase 2 of overall project to implement a CI/CL workflow automation across all submodules:
This establishes the foundation for consistent and automated PR validation across the entire platform, thus reducing manual QA load, catching breaking changes earlier, and preparing the repo for future phases.
So far, what is intentionally still not included is as follows:
These will be added in later phases once the basic CI is stable.
@jrb00013
@Team-Deepiri/support-team