Skip to content

chore: setup project linting, formatting, and CI workflows with impro…#21

Open
Johnsource-hub wants to merge 5 commits into
Kolo-Org:mainfrom
Johnsource-hub:Implement-Comprehensive-CI-CD-Pipeline-using-Git-Hub-Actions
Open

chore: setup project linting, formatting, and CI workflows with impro…#21
Johnsource-hub wants to merge 5 commits into
Kolo-Org:mainfrom
Johnsource-hub:Implement-Comprehensive-CI-CD-Pipeline-using-Git-Hub-Actions

Conversation

@Johnsource-hub

Copy link
Copy Markdown

#closes
#20
I have successfully set up the CI/CD pipeline using GitHub Actions to automatically trigger on pull requests and pushes to the main branch.

Here is what was accomplished:

CI Pipeline Creation: Created .github/workflows/ci.yml incorporating steps to checkout the code, setup Node.js v20, install dependencies, run Prisma generation and validation, linting/formatting checks, type checking (npx tsc --noEmit), and Jest unit tests.
Dependency Configuration: Updated package.json with appropriate "lint" and "format" scripts. Added the necessary ESLint and Prettier devDependencies (eslint, prettier, @typescript-eslint/parser, @typescript-eslint/eslint-plugin). Also installed i18next that was missing.
ESLint & Prettier Configurations: Created basic configurations (.eslintrc.json and .prettierrc) so the pipeline runs efficiently and checks the code structure reliably.
Fixing Existing Codebase Issues: While testing the CI pipeline locally, I found several existing compilation errors and broken unit tests in the codebase which would have blocked the CI workflow:
Fixed missing braces in tests/stellar.service.test.ts.
Fixed malformed merge conflict code inside src/services/user.service.ts affecting Stellar wallet generation.
Refactored src/services/stellar.service.ts to actually encrypt Stellar wallet secrets (which its unit tests expected) and fixed the GeneratedWallet type.
Fixed missing t translation variables and shadowing block-scoped user variables in src/services/message-processor.service.ts.
Removed duplicate Prisma client instantiations from src/services/group.service.ts that conflicted with each other.
Adjusted message-processor.service.test.ts and user.service.test.ts to mock and expect the correct language formats and translation strings.

@Queenode

Copy link
Copy Markdown
Contributor

Thanks for the explanation @Johnsource-hub . I understand why application code changes were included, since introducing CI often exposes existing compilation errors, failing tests, missing dependencies, and other issues that need to be addressed before the pipeline can pass.

My main concern is that the artifacts attached to the PR still appear to show failures:

  • ts_errors.txt contains multiple TypeScript compilation errors.
  • final_test.txt shows a failing Jest suite (stellar.service.test.ts).

Can you clarify whether those files were generated before or after your fixes?

Also, could you provide evidence that the current branch successfully passes:

npm run lint
npm run format
npx prisma validate
npx tsc --noEmit
npm test

or share a successful GitHub Actions run/screenshot from this branch?

If those artifacts are outdated and the current branch passes all checks, that would address my concern regarding the CI acceptance criteria.
Thank you so much for your contribution

@Queenode

Copy link
Copy Markdown
Contributor

@Johnsource-hub any update?

@Johnsource-hub

Copy link
Copy Markdown
Author

working on it

@Johnsource-hub

Copy link
Copy Markdown
Author

done

@Queenode

Copy link
Copy Markdown
Contributor

@Johnsource-hub please help fix conflict also you are yet to share a screenshot that the CI passed
Thank you for your contribution

@Queenode

Copy link
Copy Markdown
Contributor

@Johnsource-hub what is the update

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