SurfSense icon indicating copy to clipboard operation
SurfSense copied to clipboard

docs: add Makefile usage section to README for development tasks

Open cubxxw opened this issue 7 months ago • 4 comments

This pull request introduces a comprehensive CI/CD system for the SurfSense project, leveraging GitHub Actions workflows to automate testing, building, and deployment processes. It includes new workflows for backend, web, and browser extension components, as well as integration workflows for end-to-end testing, security scanning, and automated dependency updates. Additionally, documentation has been added to explain the CI/CD architecture and its relationship with local development via the Makefile.

CI/CD Workflow Additions

  • Backend Workflow: Implements a CI/CD pipeline for the backend, including tests, linters, and dependency management using Python and PostgreSQL (.github/workflows/backend-ci.yml).
  • Web Workflow: Adds a CI/CD pipeline for the web frontend, handling linting, building, and artifact upload (.github/workflows/web-ci.yml).
  • Browser Extension Workflow: Introduces a CI/CD pipeline for building and packaging browser extensions, with artifacts uploaded for Chrome, Firefox, and Edge (.github/workflows/extension-ci.yml).
  • Integration Workflow: Provides an end-to-end testing and security scanning workflow, including support for manual triggering with custom parameters (.github/workflows/integration-ci.yml).
  • Dependency Updates Workflow: Automates weekly dependency updates for backend, web, and browser extension components (.github/workflows/dependency-updates.yml).

Documentation Updates

  • CI/CD Reference Guide: Adds CICD.md, detailing the architecture, workflows, and integration with the Makefile for local development. It also explains secrets management and manual workflow triggering.
  • Workflows Overview: Adds a README.md in the .github/workflows directory, summarizing the purpose and functionality of each workflow.

Configuration Enhancements

  • Dependabot Configuration: Introduces a dependabot.yml file to schedule automated dependency updates for GitHub Actions workflows (.github/dependabot.yml).

Summary by CodeRabbit

  • New Features

    • Added automated CI/CD workflows for backend, web, and browser extension components, including linting, testing, building, packaging, and artifact uploads.
    • Introduced scheduled and manual dependency update workflows for all major components.
    • Implemented integration workflows for end-to-end testing and security scanning.
    • Provided a unified Makefile for streamlined development, testing, deployment, and maintenance tasks.
  • Documentation

    • Added comprehensive documentation for CI/CD architecture, workflow usage, and Makefile commands in project and workflow-specific README files.
    • Introduced a detailed CICD reference guide for developers.

cubxxw avatar May 14 '25 09:05 cubxxw

@cubxxw is attempting to deploy a commit to the Rohan Verma's projects Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar May 14 '25 09:05 vercel[bot]

Walkthrough

This update introduces a comprehensive CI/CD and DevOps system for the SurfSense project. It adds detailed GitHub Actions workflows for backend, web frontend, browser extension, integration testing, and dependency updates. A unified Makefile and extensive documentation are also included, standardizing development, build, test, deployment, and maintenance processes across all components.

Changes

File(s) Change Summary
.github/dependabot.yml Added Dependabot configuration for automated weekly updates of GitHub Actions workflow dependencies.
.github/workflows/backend-ci.yml
.github/workflows/web-ci.yml
.github/workflows/extension-ci.yml
.github/workflows/integration-ci.yml
.github/workflows/dependency-updates.yml
Added multiple GitHub Actions workflows:
- Backend CI/CD: Linting, testing, and database-backed test execution for backend.
- Web CI/CD: Linting and build automation for web frontend.
- Browser Extension CI/CD: Build, package, and artifact upload for browser extension.
- Integration CI/CD: End-to-end tests, security scans, and conditional execution.
- Dependency Updates: Scheduled weekly updates for backend, web, and extension dependencies.
.github/workflows/README.md Added documentation describing all GitHub Actions workflows, their triggers, core functionalities, and extension guidance for CI/CD automation.
CICD.md Added a comprehensive reference guide for the CI/CD system, documenting workflow architecture, mapping to Makefile targets, environment differences, manual triggers, secrets management, and continuous improvement practices.
Makefile Introduced a unified Makefile with standardized targets for backend, web, extension, Docker, deployment, database management, monitoring, and utilities, centralizing build, test, and deployment workflows.
README.md Enhanced with new sections on CI/CD & DevOps and Makefile usage, detailing workflows, command usage, and referencing CICD.md for further information.

Sequence Diagram(s)

sequenceDiagram
    participant Developer
    participant GitHub
    participant ActionsRunner
    participant Backend/Web/Extension/Integration
    participant ArtifactStore

    Developer->>GitHub: Push/PR/Manual Trigger
    GitHub->>ActionsRunner: Start Workflow (per component)
    ActionsRunner->>Backend/Web/Extension/Integration: Run CI/CD Jobs (lint, test, build, package)
    Backend/Web/Extension/Integration-->>ActionsRunner: Job Results (success/failure, artifacts)
    ActionsRunner->>ArtifactStore: Upload Build Artifacts (if applicable)
    ActionsRunner-->>GitHub: Report Status, Artifacts, and Logs

Possibly related issues

  • MODSetter/SurfSense#99: Implements a comprehensive Makefile at the project root, matching the objective to unify development, build, test, and deployment commands.
  • MODSetter/SurfSense#98: Establishes a robust CI/CD system with multiple GitHub Actions workflows, directly addressing the issue's goals for automated workflows across all components.

Poem

In the warren of code, the CI bunnies hop,
With Makefiles and Actions, they never do stop.
They lint and they test, build dreams in the cloud,
Packaging carrots—err, artifacts—feeling quite proud!
Docs now abound, workflows are neat,
SurfSense is ready, with pipelines complete!

 (\(\  
( -.-)  
o_(")(")  — DevOps bunny at your service!

[!TIP]

⚡️ Faster reviews with caching
  • CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.

Enjoy the performance boost—your workflow just got faster.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

coderabbitai[bot] avatar May 14 '25 09:05 coderabbitai[bot]

Hey @cubxxw , Thanks for this .... will test this and merge by EOD. Good Work.

MODSetter avatar May 14 '25 23:05 MODSetter

@cubxxw Can you take a look at the PR review. 👍

MODSetter avatar May 15 '25 22:05 MODSetter