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
- A developer creates a PR from
dev to main.
- GitHub Actions automatically triggers the CI workflow (Linting, Testing, Building).
- Gatekeeper:
- If any check fails, the "Merge" button in the PR is disabled.
- If all checks pass, the PR is cleared for merging.
Tasks
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
mainand ensure that code can only be merged if all automated tests pass successfully.Objectives
mainanddevbranches.main. Merging intomainmust require a PR.Proposed Workflow
devtomain.Tasks
.github/workflows/ci.yml)pull_requestandpushtodev/main)main:Require a pull request before mergingRequire status checks to pass before mergingand select the new CI workflow