Skip to content

Create CI/CD Pipeline #53

Description

@lauxenz

Description

Currently, there are no automated checks or restrictions when merging or pushing code from the development branch (dev) into the production branch (main). To ensure code quality, stability, and prevent broken code from reaching production, we need to implement a GitHub Actions CI Pipeline and enforce branch protection rules.

The core goal is to prevent any direct pushes to main and ensure that code can only be merged if all automated tests pass successfully.

Objectives

  • Automated Testing: Trigger automated tests on every Pull Request (PR) directed towards the main and dev branches.
  • Branch Protection: Block direct pushes to main. Merging into main must require a PR.
  • Status Checks: Require the GitHub Actions workflow to pass successfully before a PR can be merged.

Proposed Workflow

  1. A developer creates a PR from dev to main.
  2. GitHub Actions automatically triggers the CI workflow (Linting, Testing, Building).
  3. Gatekeeper:
    • If any check fails, the "Merge" button in the PR is disabled.
    • If all checks pass, the PR is cleared for merging.

Tasks

  • Create GitHub Actions workflow file (.github/workflows/ci.yml)
  • Define trigger events (pull_request and push to dev/main)
  • Set up workflow jobs:
    • Environment setup (Node.js, Python, Docker, etc.) & dependency installation
    • Linter & code formatting checks
    • Running the test suite
    • Project build check (to ensure it compiles)
  • Configure Branch Protection Rules in GitHub Repository Settings for main:
    • Check Require a pull request before merging
    • Check Require status checks to pass before merging and select the new CI workflow
    • Do not allow bypassing the above settings

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions