ci: stabilize pipeline
This commit is contained in:
		
							
								
								
									
										45
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										45
									
								
								README.md
									
									
									
									
									
								
							| @@ -62,44 +62,16 @@ A comprehensive SAAS application for managing recruiter workflows, built with mo | ||||
|    The defaults support Docker-based development. Adjust values as needed for local tooling or deployment pipelines. | ||||
|  | ||||
| 3. **Start the application with Docker (recommended for parity)** | ||||
|    This single command builds the images, starts all services, runs database migrations, and seeds the database with sample data. | ||||
|    ```bash | ||||
|    docker-compose up --build | ||||
|    ``` | ||||
|  | ||||
| 4. **Initialize the database** | ||||
|    ```bash | ||||
|    # Run database migrations | ||||
|    docker-compose exec merchantsofhope-supplyanddemandportal-backend npm run migrate | ||||
|     | ||||
|    # Seed the database with sample data | ||||
|    docker-compose exec merchantsofhope-supplyanddemandportal-backend npm run seed | ||||
|    ``` | ||||
|  | ||||
| 5. **Access the application** | ||||
| 4. **Access the application** | ||||
|    - Frontend: http://localhost:12000 | ||||
|    - Backend API: http://merchantsofhope-supplyanddemandportal-backend:3001 (inside Docker network) or http://localhost:3001 when running natively | ||||
|    - Backend API: http://localhost:3001 (from host) or `http://merchantsofhope-supplyanddemandportal-backend:3001` (from other containers) | ||||
|    - Database: merchantsofhope-supplyanddemandportal-database:5432 (inside Docker network) | ||||
|  | ||||
| ### Alternative: Native Node.js workflow | ||||
|  | ||||
| If you prefer running services outside Docker: | ||||
|  | ||||
| ```bash | ||||
| # Install dependencies | ||||
| cd backend && npm install | ||||
| cd ../frontend && npm install | ||||
|  | ||||
| # Start backend (uses .env) | ||||
| cd ../backend | ||||
| npm run dev | ||||
|  | ||||
| # In a separate terminal start frontend | ||||
| cd ../frontend | ||||
| npm start | ||||
| ``` | ||||
|  | ||||
| Ensure a PostgreSQL instance is running and the `DATABASE_URL` in `.env` points to it. The frontend `.env.development` file pins the dev server to `0.0.0.0:12000` so it matches the Docker behaviour. | ||||
|  | ||||
| ### Demo Accounts | ||||
|  | ||||
| The application comes with pre-seeded demo accounts: | ||||
| @@ -151,13 +123,12 @@ The application comes with pre-seeded demo accounts: | ||||
|  | ||||
| ## Testing | ||||
|  | ||||
| ### Backend Tests | ||||
| ```bash | ||||
| # Run all tests | ||||
| docker-compose exec merchantsofhope-supplyanddemandportal-backend npm test | ||||
| ### Running CI Tests Locally | ||||
|  | ||||
| # Run tests in watch mode | ||||
| docker-compose exec merchantsofhope-supplyanddemandportal-backend npm run test:watch | ||||
| To validate the entire CI pipeline on your local machine before pushing to Gitea, use the dedicated test configuration. This command builds the necessary images and runs both backend and frontend test suites, exiting with a status code indicating success or failure. | ||||
|  | ||||
| ```bash | ||||
| docker-compose -f docker-compose.yml -f docker-compose.test.yml up --build --abort-on-container-exit | ||||
| ``` | ||||
|  | ||||
| ### Frontend Tests | ||||
|   | ||||
		Reference in New Issue
	
	Block a user