Skip to content

Refactor CI workflow for dependency installation#215

Closed
mubking wants to merge 1 commit intoLabsCrypt:mainfrom
mubking:patch-4
Closed

Refactor CI workflow for dependency installation#215
mubking wants to merge 1 commit intoLabsCrypt:mainfrom
mubking:patch-4

Conversation

@mubking
Copy link
Copy Markdown
Contributor

@mubking mubking commented Feb 26, 2026

Updated CI workflow to use 'npm install --ignore-scripts' instead of 'npm ci' for both frontend and backend. Removed caching for npm dependencies.

Description

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🔧 Refactoring (no functional changes)
  • ⚡ Performance improvement
  • 🧪 Test addition or update

Related Issues

Closes #

Changes Made

Testing

Test Coverage

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed

Test Steps

Breaking Changes

Breaking Changes:

Migration Guide:

Screenshots/Demo

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published
  • I have checked for breaking changes and documented them if applicable

Additional Notes

Updated CI workflow to use 'npm install --ignore-scripts' instead of 'npm ci' for both frontend and backend. Removed caching for npm dependencies.
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 @mubking, thanks for the iteration!

similar to my comment on the previous PR, changing to npm install --ignore-scripts and removing caching isn't the ideal fix, as npm ci ensures a clean, deterministic build and caching heavily speeds up our pipelines.

the original error happened because the runner couldn't find the package-lock.json files at the specified paths. could you revert the npm install change and instead ensure the cache-dependency-path correctly points to where our lockfiles actually live?

let me know if you need help with it! if you want to contribute more or follow up if issues are open, join us on Telegram: https://t.me/+DOylgFv1jyJlNzM0

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 contribution!

To ensure your Pull Request passes the CI pipeline and maintains repository stability, please follow these technical requirements:

1. Backend Testing (Vitest)

  • Version: We have standardized on Vitest ^2.1.8. Do not upgrade to v3 or v4 without explicit approval, as they introduce native dependency issues in the CI environment.
  • Isolation: Each test file now runs in its own forked process (pool: 'forks'). This prevents vi.mock() and other module-level states from leaking between files.
  • Prisma Mocking: When testing controllers, always mock the Prisma client in backend/src/lib/prisma.ts. Do not rely on a real database for unit tests.
  • CLI Flags: Avoid using the --verbose flag in Vitest commands, as it is incompatible with the v2 CLI.

2. API Versioning & Routing

  • Endpoints: Hit versioned endpoints (e.g., /v1/streams) instead of the deprecated root endpoints (e.g., /streams).
  • Response Codes: Endpoints return 410 Gone for specifically deprecated routes. Ensure your tests handle these correctly.
  • Input Validation: Controllers expect strict field names (e.g., streamId, ratePerSecond, depositedAmount). Use the types defined in src/services/ and src/controllers/.

3. Infrastructure & Dependencies

  • Husky: The pipeline skips Husky. Your package.json scripts should use husky || true to prevent non-interactive shell failures.
  • Prisma Generation: Always ensure your workflow runs prisma generate before tests. The CI now handles this in a consolidated "Setup Database" step.
  • Native Bindings: If you add dependencies with native bindings (like Rollup or ESBuild), ensure they are compatible with the ubuntu-latest (linux-x64) runner.

4. Frontend Best Practices

  • Directives: Always include "use client" at the top of components that utilize React hooks or browser APIs.
  • Dependencies: Ensure all utilized libraries (like react-hot-toast) are explicitly added to frontend/package.json and not just inherited from the root.

Please make sure your CI passes before we finalize the merge. Let us know if you have any questions!

If you want to follow up or have questions, join us on Telegram: https://t.me/+DOylgFv1jyJlNzM0

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 again — still waiting on those updates to fix the CI based on our last comment. no rush if you're busy, just let us know if you plan to continue with it or if we should close it for now!

if you want to contribute more or follow up if issues are open, join us on Telegram: https://t.me/+DOylgFv1jyJlNzM0

@ogazboiz
Copy link
Copy Markdown
Contributor

closing due to inactivity — feel free to reopen when you're ready to continue!

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