diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2a5bf44..8fc3051 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,11 +4,13 @@ on: push: branches: - main + - develop - "feat/**" - "bugfix/**" pull_request: branches: - main + - develop # Cancel in-progress runs for the same workflow and branch concurrency: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bb9bbf1..6b365e2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -124,14 +124,19 @@ poetry run pytest ### 1. Create a Feature Branch -Always create a new branch for your work: +We use a **develop branch workflow**: +- `main` - Stable release branch (protected) +- `develop` - Active development integration branch +- Feature branches - Created from and merged back to `develop` + +Always create a new branch for your work from `develop`: ```bash -# Update your main branch -git checkout main -git pull upstream main +# Update your develop branch +git checkout develop +git pull upstream develop -# Create a feature branch +# Create a feature branch from develop git checkout -b feature/your-feature-name # Or for bug fixes @@ -145,6 +150,11 @@ Branch naming conventions: - `refactor/description` - Code refactoring - `test/description` - Test additions/improvements +**Workflow Summary**: +1. Feature branches are created from `develop` +2. Pull requests target `develop` (not `main`) +3. `main` receives periodic releases from `develop` via PR + ### 2. Make Your Changes Follow these guidelines when writing code: @@ -386,7 +396,7 @@ git commit -m "test: add integration tests for tournaments" git push origin feature/your-feature-name ``` -Then create a pull request on GitHub with: +Then create a pull request on GitHub **targeting the `develop` branch** with: 1. **Clear title** describing the change 2. **Description** including: diff --git a/README.md b/README.md index 1ca06b6..c2b8735 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![PyPI version](https://img.shields.io/pypi/v/ifpa-api.svg)](https://pypi.org/project/ifpa-api/) [![Python versions](https://img.shields.io/pypi/pyversions/ifpa-api.svg)](https://pypi.org/project/ifpa-api/) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) -[![CI](https://github.com/johnsosoka/ifpa-api-python/workflows/CI/badge.svg)](https://github.com/johnsosoka/ifpa-api-python/actions/workflows/ci.yml) +[![CI](https://github.com/johnsosoka/ifpa-api-python/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/johnsosoka/ifpa-api-python/actions/workflows/ci.yml) [![codecov](https://codecov.io/gh/johnsosoka/ifpa-api-python/branch/main/graph/badge.svg)](https://codecov.io/gh/johnsosoka/ifpa-api-python) [![Documentation](https://img.shields.io/badge/docs-mkdocs-blue.svg)](https://johnsosoka.github.io/ifpa-api-python/) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)