Skip to content

Setup CI/CD#30

Merged
HarelZeevi merged 5 commits into
mainfrom
test-ci-setup
May 27, 2026
Merged

Setup CI/CD#30
HarelZeevi merged 5 commits into
mainfrom
test-ci-setup

Conversation

@HarelZeevi
Copy link
Copy Markdown
Collaborator

🚀 feat: Setup Full CI/CD Pipeline & Unit Tests

📝 Summary

This PR introduces a complete automation infrastructure for the project, including comprehensive Unit Tests, a GitHub Actions configuration, and an enhanced Makefile for a smoother workflow.
The goal is to ensure that no broken code reaches main and that every valid version is automatically packaged into a Docker image.

🛠️ Key Changes

  • 🤖 CI/CD Workflow (ci-cd.yaml):

    • Added a pipeline that runs on every push and pull_request.
    • CI: Automatically executes make deps, make test, and make build.
    • CD: Builds a Docker Image and pushes it to GitHub Packages (GHCR) only upon merging to main.
  • 🧪 Unit Tests (main_test.go):

    • Authored ~35 tests covering all API endpoints (/login, /schools, /cart, etc.).
    • Includes coverage for Edge Cases, Input Validation, and Session Logic.
    • Utilizes httptest to verify server behavior without needing a running instance.
  • ⚙️ Makefile Update:

    • Added a smart make test command.
    • Integrated support for gotestsum for colorful and readable terminal output (with a fallback to standard go test in the CI environment).

✅ Test Plan

  1. Ran make test locally in WSL and received a PASS on all checks.
  2. Verified that the GitHub Action workflow triggers and succeeds (Green ✔️) on the current branch.
  3. Confirmed that the Docker Image builds successfully in the CI environment.

📦 Post-Merge

Once this PR is approved and merged into main, the GitHub Actions workflow will trigger again to build the

@HarelZeevi HarelZeevi added the enhancement New feature or request label Jan 21, 2026
@NoamBenShimon NoamBenShimon self-requested a review January 27, 2026 17:51
Copy link
Copy Markdown

@Tomer-David Tomer-David left a comment

Choose a reason for hiding this comment

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

Looks good

@HarelZeevi HarelZeevi merged commit e267762 into main May 27, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants