Skip to content

configured github flows and CI actions#118

Closed
ekumamatthew wants to merge 11 commits intoLabsCrypt:mainfrom
ekumamatthew:main
Closed

configured github flows and CI actions#118
ekumamatthew wants to merge 11 commits intoLabsCrypt:mainfrom
ekumamatthew:main

Conversation

@ekumamatthew
Copy link
Copy Markdown

this PR closes #80

created a comprehensive CI/CD workflow for the FlowFi project that prevents regressions on every push to main:

What Was Built

  • GitHub Actions workflow (.github/workflows/test.yml) that triggers on PRs to main
  • Multi-language testing setup supporting Rust (smart contracts) and Node.js (backend/frontend)
  • Automated dependency installation for Rust cargo and npm packages
  • Strict failure handling - workflow fails if any test suite fails

Test Coverage

  • Rust tests: cargo test in /contracts directory (existing Soroban smart contract tests)
  • Backend tests: Jest + TypeScript setup in /backend directory
  • Frontend tests: Jest + React Testing Library setup in /frontend directory

Key Features

  • Dependency caching for faster builds
  • Parallel test execution across all three components
  • Zero-configuration testing - just run npm test or cargo test
  • Blocks PR merges until all tests pass

Copy link
Copy Markdown
Contributor

@ogazboiz ogazboiz left a comment

Choose a reason for hiding this comment

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

Thanks for setting up the CI pipeline! This is a great step for the project. I have a few suggestions to make it more robust:

  1. Test Script Resilience: Currently, in the backend will fail because the script is just an error placeholder. I suggest using or updating the package.json to have a basic test setup.
  2. Linting: It would be great to add a linting step (e.g., ) to ensure consistent code style across PRs.
  3. Workflow Name: 'Test Suite' is clear, but maybe 'CI / Validation' would be even better as we add more checks.

Overall, great work! Looking forward to the next iteration.

Copy link
Copy Markdown
Contributor

@ogazboiz ogazboiz left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. This has conflicts with main. Please resolve them. Also, use 'npm test --if-present' to avoid CI failure when tests are missing.

Copy link
Copy Markdown
Contributor

@ogazboiz ogazboiz left a comment

Choose a reason for hiding this comment

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

Thanks for setting up the CI pipeline! I've recently merged several PRs that refactored the backend to use 'vitest' and changed the architecture to an 'app.ts' model.

Currently, this PR has conflicts and introduces 'jest' which is now redundant for the backend. Could you please:

  1. Rebase on the latest 'main'.
  2. Align the CI workflow with the new 'npm install' and 'vitest' setup.
  3. Remove the redundant 'jest' configurations for the backend.

Looking forward to the updated CI! 🚀

@ekumamatthew
Copy link
Copy Markdown
Author

okay I'll do that now. I'm just seeing this

Copy link
Copy Markdown
Contributor

@ogazboiz ogazboiz left a comment

Choose a reason for hiding this comment

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

Following up on my earlier review: our main branch now uses vitest for the backend (see merged #112). Please update your CI workflow to use npm test (which runs vitest) instead of configuring jest. Also, note that react-hot-toast was just added as a root dependency in #145 — please pull the latest main before rebasing to avoid lockfile conflicts. Looking forward to the updated CI! 🚀

Copy link
Copy Markdown
Contributor

@ogazboiz ogazboiz left a comment

Choose a reason for hiding this comment

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

Third review follow-up: we have now merged #145 (react-hot-toast) and #147 (security policy + CodeQL). The CI workflow needs to: 1) use npx vitest run or npm test (mapped to vitest in package.json) for backend tests, not Jest 2) update the package-lock.json reference for the new dependencies. Please rebase on the latest main before updating the workflow to avoid lockfile conflicts.

Copy link
Copy Markdown
Contributor

@ogazboiz ogazboiz left a comment

Choose a reason for hiding this comment

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

Third review follow-up: our main branch now uses vitest for the backend (see merged #112). Please update your CI workflow to use npm test (which runs vitest) instead of configuring jest. Also, note that we recently merged several PRs that updated dependencies — please rebase on the latest main to avoid lockfile conflicts.

@ekumamatthew
Copy link
Copy Markdown
Author

i have just sync my fork to get the latest update.. I am looking through to remove jest and use vitest

@ekumamatthew
Copy link
Copy Markdown
Author

hi @ogazboiz i have made Some fixes.. have a look

ogazboiz

This comment was marked as duplicate.

Copy link
Copy Markdown
Contributor

@ogazboiz ogazboiz left a comment

Choose a reason for hiding this comment

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

hey, thanks for the updates!

i just checked it out, but it looks like the PR still has merge conflicts with main because it's coming from your main branch. to get this merged, you'll need to rebase it: git fetch origin && git rebase origin/main and resolve any conflicts.

also, our test runner has moved from jest to vitest — the backend test command is now simply npm test. could you double check that the CI workflow file is using vitest? let me know when you've pushed the rebased version!

@ekumamatthew
Copy link
Copy Markdown
Author

hey, thanks for the updates!

i just checked it out, but it looks like the PR still has merge conflicts with main because it's coming from your main branch. to get this merged, you'll need to rebase it: git fetch origin && git rebase origin/main and resolve any conflicts.

also, our test runner has moved from jest to vitest — the backend test command is now simply npm test. could you double check that the CI workflow file is using vitest? let me know when you've pushed the rebased version!

Hi. I have done what i can with the CI intergration..

i have rebase and merge to current changes, please can you look into it. maybe its a little fix i'm not seeing .

Copy link
Copy Markdown
Contributor

@ogazboiz ogazboiz left a comment

Choose a reason for hiding this comment

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

hey, thanks for updating!

the .github/workflows/test.yml structure looks good now. however, there's a bun.lockb file in the diff, which means you probably used bun install locally. the project uses npm exclusively right now, and having both lockfiles will confuse the CI parser.

could you run these commands to fix it?

git rm bun.lockb
npm minstall
git add package-lock.json frontend/package-lock.json backend/package-lock.json
git commit -m "use npm lockfile instead of bun"
git push

once the bun lockfile is gone, the CI should run successfully and we can merge this in!

@ekumamatthew
Copy link
Copy Markdown
Author

hey, thanks for updating!

the .github/workflows/test.yml structure looks good now. however, there's a bun.lockb file in the diff, which means you probably used bun install locally. the project uses npm exclusively right now, and having both lockfiles will confuse the CI parser.

could you run these commands to fix it?

git rm bun.lockb
npm minstall
git add package-lock.json frontend/package-lock.json backend/package-lock.json
git commit -m "use npm lockfile instead of bun"
git push

once the bun lockfile is gone, the CI should run successfully and we can merge this in!

Okay I will do that right now

@ogazboiz ogazboiz mentioned this pull request Feb 24, 2026
9 tasks
Copy link
Copy Markdown
Contributor

@ogazboiz ogazboiz left a comment

Choose a reason for hiding this comment

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

hey! just checking in on this one.

since we've had several other CI/Action PRs land recently, could you check if this is still providing a unique fix or if it's now redundant? also, the tests are currently failing, so it might need a rebase anyway.

if it's no longer needed, feel free to close it — otherwise, let us know once it's rebased and green!

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.

Infra: GitHub Actions CI

2 participants