diff --git a/.github/workflows/pr-into-dev.yml b/.github/workflows/pr-into-dev.yml index 7d67ce2..34701c1 100644 --- a/.github/workflows/pr-into-dev.yml +++ b/.github/workflows/pr-into-dev.yml @@ -1,17 +1,17 @@ # ───────────────────────────────────────────────────────────────── # PR into Dev Workflow # ───────────────────────────────────────────────────────────────── -# Validates feature/fix/hotfix pull requests before merging to dev. +# Validates pull requests before merging to dev. # # Validations: -# - Source branch must be feature/*, fix/*, or hotfix/* +# - Source branch must be feature/*, fix/*, hotfix/*, or test/* # - PR title must follow conventional commit format # - At least one issue must be linked # - All quality gates must pass # - Fork PRs run read-only checks # # Author: Alireza Rezvani -# Date: 2025-11-06 +# Date: 2025-11-07 # ───────────────────────────────────────────────────────────────── name: PR into Dev @@ -77,13 +77,14 @@ jobs: echo "🔍 Validating branch name: $BRANCH_NAME" # Check if branch follows naming convention - if [[ ! "$BRANCH_NAME" =~ ^(feature|fix|hotfix)/ ]]; then + if [[ ! "$BRANCH_NAME" =~ ^(feature|fix|hotfix|test)/ ]]; then echo "❌ Invalid branch name: $BRANCH_NAME" echo "" echo "Branch must start with one of:" echo " - feature/ (for new features)" echo " - fix/ (for bug fixes)" echo " - hotfix/ (for critical fixes)" + echo " - test/ (for workflow testing)" echo "" echo "Example: feature/issue-123-add-user-auth" exit 1 diff --git a/PROPER_TEST_FLOW.md b/PROPER_TEST_FLOW.md new file mode 100644 index 0000000..ce94d1e --- /dev/null +++ b/PROPER_TEST_FLOW.md @@ -0,0 +1,67 @@ +# Proper Workflow Test - Standard Flow + +**Date**: 2025-11-07 +**Flow**: `test/proper-workflow-validation → dev → main` +**Purpose**: Validate correct branch flow and release gates + +--- + +## ✅ Correct Flow + +### Step 1: test/* → dev +- Branch: `test/proper-workflow-validation` +- Target: `dev` +- Expected: PR should be allowed and checks should run + +### Step 2: dev → main +- Branch: `dev` +- Target: `main` +- Expected: Release gates should run and pass + +--- + +## What This Tests + +### Branch Pattern Enforcement +- ✅ test/* branches CANNOT merge directly to main +- ✅ test/* branches CAN merge to dev +- ✅ dev branch CAN merge to main +- ✅ Proper error messages when flow is violated + +### Standard Flow Validation +- ✅ PR checks run on test/* → dev +- ✅ Release gates run on dev → main +- ✅ All quality gates execute properly +- ✅ No workflow bypasses + +### Complete Release Pipeline +1. Feature/test development on test/* branch +2. PR and merge to dev +3. Dev accumulates changes +4. Release PR from dev to main +5. Release gates validate production readiness +6. Merge to main (production) + +--- + +## Success Criteria + +**PR #1 (test/* → dev):** +- ✅ PR allowed and created +- ✅ Quality checks run +- ✅ Can be merged to dev + +**PR #2 (dev → main):** +- ✅ Source branch validation passes (dev is allowed) +- ✅ Production build succeeds +- ✅ Smoke tests pass +- ✅ Security scan runs (informational) +- ✅ Deployment readiness completes +- ✅ Release gate status evaluates correctly +- ✅ Can be merged to main + +--- + +**Created**: 2025-11-07 +**Previous PR #8**: Closed (test/* → main not allowed) +**This PR Flow**: test/* → dev → main (correct)