Skip to content

Stop ignoring .github and add CI workflow#128

Open
austinm2h35-sketch wants to merge 9 commits intomainfrom
austin_heitzman/qa/ci/step-2-build-tests
Open

Stop ignoring .github and add CI workflow#128
austinm2h35-sketch wants to merge 9 commits intomainfrom
austin_heitzman/qa/ci/step-2-build-tests

Conversation

@austinm2h35-sketch
Copy link
Contributor

Phase 2 of overall project to implement a CI/CL workflow automation across all submodules:

  • Added platform-build-and-test yml file which combs through each submodule in parallel to check which types of tests it needs to run
  • Automatically runs build and install tests to check that incoming PRs are safe for QA; if not, test will fail and dev should adjust the PR before pushing
  • Edited the .gitignore file so that it stops ignoring .github in order for these tests to properly work
  • Archives ci.yml (now renamed old-ci.yml) so that there are no workflow conflicts

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:

  • No linting or type-catching steps
  • No caching or performance optimization
  • No deployment steps
  • No per-language test orchestration beyond what's already specified in the submodules

These will be added in later phases once the basic CI is stable.

@jrb00013
@Team-Deepiri/support-team

@austinm2h35-sketch
Copy link
Contributor Author

@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.

@jrb00013
Copy link
Member

jrb00013 commented Mar 8, 2026

@austinm2h35-sketch will get to this eventually

Copy link
Member

@jrb00013 jrb00013 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

  1. 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

@jrb00013
Copy link
Member

@austinm2h35-sketch

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

@jrb00013
Copy link
Member

@austinm2h35-sketch You got this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants