@@ -91,6 +91,77 @@ Deploys when pushing a tag with the `prod-` prefix.
91912 . View deployment: https://rainbowrelax.web.app
92923 . Monitor status: ** Actions > Deploy to Firebase PROD**
9393
94+ ---
95+ # CI/CD Pipeline
96+
97+ This project uses GitHub Actions for automated testing, linting, and deployment. All workflows run on pull requests and pushes to ensure code quality.
98+
99+ ## Workflows
100+
101+ ### 1. Lint Validation (` lint.yml ` )
102+ - ** Triggers** : Pull requests and pushes to ` main `
103+ - ** Purpose** : Validates code quality before merge
104+ - ** Runs** : ESLint and TypeScript compilation checks
105+ - ** Duration** : ~ 2-3 minutes
106+ - ** Benefit** : Prevents linting errors from reaching main branch, avoiding deployment failures
107+
108+ ### 2. Playwright Tests (` playwright-tests.yml ` )
109+ - ** Triggers** : Pull requests and pushes to ` main `
110+ - ** Purpose** : Run end-to-end tests to ensure functionality
111+ - ** Runs** :
112+ - ESLint validation
113+ - TypeScript compilation
114+ - Build application
115+ - Run all 84+ E2E tests (using 4 parallel workers)
116+ - ** Duration** : ~ 5-7 minutes
117+ - ** Benefit** : Comprehensive validation before merge and deployment
118+
119+ ### 3. Firebase Deployment Workflows
120+
121+ All deployment workflows use the reusable ` firebase-deployment.yml ` workflow which ensures:
122+ 1 . ✅ ESLint validation passes
123+ 2 . ✅ TypeScript compilation succeeds
124+ 3 . ✅ Application builds successfully
125+ 4 . ✅ Only validated code reaches production
126+
127+ #### Development Deployment (` firebase-dev.yml ` )
128+ - ** Triggers** : Push to ` main ` branch
129+ - ** Includes** : Full validation (linting, TypeScript, build)
130+ - ** Deploy** : Automatically to ` rainbowrelax-dev ` site
131+ - ** URL** : https://rainbowrelax-dev.web.app
132+
133+ #### QA Deployment (` firebase-qa.yml ` )
134+ - ** Triggers** : Push tag matching ` qa-* ` pattern
135+ - ** Includes** : Full validation before deployment
136+ - ** Deploy** : To ` rainbowrelax-qa ` site
137+ - ** URL** : https://rainbowrelax-qa.web.app
138+
139+ #### Production Deployment (` firebase-prod.yml ` )
140+ - ** Triggers** : Push tag matching ` prod-* ` pattern
141+ - ** Includes** : Full validation before deployment
142+ - ** Deploy** : To ` rainbowrelax ` site
143+ - ** URL** : https://rainbowrelax.web.app
144+
145+ ## Workflow Integration
146+
147+ The CI/CD pipeline ensures that:
148+ - ** Pull Requests** : Lint validation and tests run automatically
149+ - ** Main Branch** : All validations pass before any deployment
150+ - ** Deployments** : Only validated code reaches DEV, QA, and PROD environments
151+
152+ This prevents duplicate PRs caused by linting failures and ensures only tested, validated code is deployed.
153+
154+ ## Local Development
155+
156+ Before pushing, run locally to catch issues early:
157+
158+ ``` bash
159+ npm run lint # Check for linting errors
160+ npx tsc --noEmit # Verify TypeScript compilation
161+ npm run build # Verify build works
162+ npm run test:e2e # Run all tests
163+ ```
164+
94165---
95166# Audio Credits
96167
0 commit comments