Skip to content

Conversation

KumarAyush204
Copy link

Description

This PR introduces a GitHub Actions workflow (.github/workflows/ci.yml) that ensures the project remains in a stable and working state. The workflow runs on every push and pull request targeting the main branch.

Related Issue

Fixes #17

Motivation and Context

🤔 Motivation

  1. Ensures that all contributions are validated before merging.
  2. Protects the main branch from broken builds.
  3. Provides immediate feedback to contributors and maintainers.

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Enhancement (improvement to an existing feature)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Test (adds or updates tests only)
  • Documentation (non-code change)

How Has This Been Tested?

The CI workflow has been successfully tested in my forked repository. All jobs (backend and frontend setup, server start, and validation checks) executed as expected, and the workflow correctly reported status (✅ passed) based on current status of application health and can ❌ fail if something goes wrong.

@archa8 You can test the pipeline during merge.

Screenshots (if applicable):

image

Checklist

  • My code follows the code style of this project
  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

Copy link

netlify bot commented Oct 1, 2025

Deploy Preview for paisable canceled.

Name Link
🔨 Latest commit 271609f
🔍 Latest deploy log https://app.netlify.com/projects/paisable/deploys/68e2d87fa9c9ac00088c6558

Copy link
Member

@archa8 archa8 left a comment

Choose a reason for hiding this comment

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

Hi, thanks for adding the CI workflow! This is a great addition. I have a few suggestions:

  1. Please move the secrets (JWT_SECRET, etc.) to the repository's GitHub Secrets and reference them with ${{ secrets.SECRET_NAME }}. This is a crucial security practice, even for placeholders.
  2. The main purpose of CI is to run tests. Could you please add an npm test step for both the frontend and backend? This will act as a safety net for all future changes.
  3. Once the test commands are in place, the current logic using npm run dev and sleep can be removed.

@KumarAyush204
Copy link
Author

Sure i will fix it by today.

@archa8
Copy link
Member

archa8 commented Oct 6, 2025

Hey @KumarAyush204, thank you for opening this PR. I am not very familiar with CI workflows, but I see that you have commented out the mongo host configs, won't they cause a problem? Also, you've commented out the npm run test command in the frontend which will cause the frontend tests to be skipped.

@KumarAyush204
Copy link
Author

KumarAyush204 commented Oct 6, 2025

@archa8 Sorry I was working on the forked repo and was testing it. I didnt knew that changes are getting reflected here directly.

Copy link
Member

@Avdhesh-Varshney Avdhesh-Varshney left a comment

Choose a reason for hiding this comment

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

Un comment your services workflow. Rest All Good 🎉


echo "Server failed to start. Printing logs:"
cat server.log
kill $server_pid
Copy link
Member

Choose a reason for hiding this comment

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

Have you test in case of DB not connected?
I think you need to update the db not to be take exit in case of CI workflow. Right?

Copy link
Author

Choose a reason for hiding this comment

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

There are some problems related to db test cases right now. I'm trying to figure it out. Once fixed i will mention you.

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.

[ Feature ] GitHub Actions CI workflow for project validation

3 participants