chore: clean coverage artifacts and refresh qa docs
This commit is contained in:
41
README.md
41
README.md
@@ -72,6 +72,21 @@ A comprehensive SAAS application for managing recruiter workflows, built with mo
|
||||
- Backend API: http://localhost:3001 (from host) or `http://merchantsofhope-supplyanddemandportal-backend:3001` (from other containers)
|
||||
- Database: merchantsofhope-supplyanddemandportal-database:5432 (inside Docker network)
|
||||
|
||||
### Environment Variables
|
||||
|
||||
The backend now derives its `DATABASE_URL` automatically when the `POSTGRES_*` variables are present. The following additional variables are available:
|
||||
|
||||
```bash
|
||||
# Request throttling defaults (~100 requests / 15 minutes)
|
||||
RATE_LIMIT_WINDOW_MS=900000
|
||||
RATE_LIMIT_MAX=100
|
||||
|
||||
# Uploads directory (overridable if you mount elsewhere)
|
||||
UPLOAD_DIR=uploads/resumes
|
||||
```
|
||||
|
||||
Set `POSTGRES_PASSWORD` and `JWT_SECRET` before launching the stack. See `.env.example` for the full list.
|
||||
|
||||
### Demo Accounts
|
||||
|
||||
The application comes with pre-seeded demo accounts:
|
||||
@@ -123,21 +138,33 @@ The application comes with pre-seeded demo accounts:
|
||||
|
||||
## Testing
|
||||
|
||||
### Running CI Tests Locally
|
||||
### Quality Gates & Tests
|
||||
|
||||
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.
|
||||
`npm run lint` and `npm test` must pass in both the backend and frontend. The backend Jest suite bootstraps a disposable Postgres instance via Docker (using `docker-compose.test.yml`), so Docker must be available on your workstation.
|
||||
|
||||
Quick commands:
|
||||
|
||||
```bash
|
||||
docker-compose -f docker-compose.yml -f docker-compose.test.yml up --build --abort-on-container-exit
|
||||
# Backend
|
||||
cd backend
|
||||
npm install
|
||||
npm run lint
|
||||
npm test -- --runInBand --coverage
|
||||
|
||||
# Frontend
|
||||
cd frontend
|
||||
npm install
|
||||
npm run lint
|
||||
npm test -- --watchAll=false --coverage
|
||||
```
|
||||
|
||||
### Frontend Tests
|
||||
To mirror CI in one shot, run the helper script from the repository root:
|
||||
|
||||
```bash
|
||||
# Run frontend tests
|
||||
docker-compose exec merchantsofhope-supplyanddemandportal-frontend npm test
|
||||
./scripts/run-ci-tests.sh
|
||||
```
|
||||
|
||||
To run tests without Docker, execute `npm test` inside `backend/` or `frontend/` after installing dependencies.
|
||||
The script executes linting followed by the backend and frontend test suites (each with coverage reporting). Coverage thresholds are enforced by Jest to guard against regressions.
|
||||
|
||||
## Continuous Integration
|
||||
|
||||
|
||||
Reference in New Issue
Block a user