This repository follows a structured workflow to ensure code quality, stability, and consistency. Below are the key assumptions and guidelines that contributors should follow:
- Follow the C++ Core Guidelines.
- Use modern C++ best practices.
- Ensure all new code is covered by unit and integration tests.
-
Main Branch (
main
):- The
main
branch contains stable, production-ready code. - Direct pushes to the
main
branch are not allowed. All changes must be introduced via pull requests (PRs). - Before merging into
main
, all PRs must pass the CI/CD pipeline and receive necessary approvals.
- The
-
Development Branch (
dev
):- The
dev
branch is the primary branch for ongoing development. - All feature branches should be created from and merged back into
dev
. - Pushing to
dev
also triggers the CI/CD pipeline to ensure that ongoing development does not introduce errors.
- The
-
Feature Branches (
feature/*
):- Feature branches are used for developing new features and should be created from
dev
. - Once a feature is complete and tested, it should be merged back into
dev
. - Example:
feature/your-feature-name
.
- Feature branches are used for developing new features and should be created from
-
Push command and CI/CD:
- The CI/CD pipeline is triggered by pushes to any branch except
main
. - The pipeline includes steps such as building the project and running the unit tests.
- The CI/CD pipeline is triggered by pushes to any branch except
-
Pull Requests and CI/CD:
- To merge changes into
main
, you must create a pull request (PR). - A different CI/CD pipeline automatically runs for each PR and runs the integration tests.
- To merge changes into
-
Creating a Feature Branch:
- Ensure you're on the
dev
branch:git checkout dev git pull origin dev git checkout -b feature/your-feature-name
- Ensure you're on the
-
Committing Changes:
- Add and commit your changes with descriptive messages:
git add . git commit -m "Add new feature"
- Add and commit your changes with descriptive messages:
-
Pushing Changes:
- Push the feature branch to the remote repository to trigger the CI/CD pipeline:
git push -u origin feature/your-feature-name
- Push the feature branch to the remote repository to trigger the CI/CD pipeline:
-
Creating a Pull Request:
- Navigate to the repository on GitHub.
- Click on the "Pull requests" tab and "New pull request".
- Select
main
as the base branch and your feature branch as the compare branch. - Fill in the title and description and click "Create pull request".
-
Merging a Pull Request:
- Ensure all CI/CD checks pass and the PR is approved.
- Merge the PR on GitHub to integrate changes into
main
. - Pull changes from origin/main to local main by calling
git pull
inside main.
If you encounter any issues, please create a new issue on GitHub with a detailed description of the problem.
- Create a feature branch from
dev
:
git checkout -b feature/your-feature dev
- Make changes, add and commit:
git add .
git commit -m "Add new feature"
- Push the feature branch to remote to trigger the CI/CD pipeline:
git push -u origin feature/your-feature
- After CI/CD passes, merge the feature branch into dev:
git checkout dev
git pull origin dev # get latest updates
git merge feature/your-feature
- Push the updated
dev
branch:
git push -u origin dev
- Delete the feature branch on local and on remote:
git branch -d feature/your-feature
git push origin --delete feature/your-feature
For any questions and/or contributions, please contact Anthony Makarewicz at [email protected]