Appearance
Quality Gate
The quality gate is the required set of backend, frontend, documentation, and Docker checks for MyHoreca Pay.
Local Quality Gate
Run these commands from a clean working tree before opening or updating a pull request.
Backend:
bash
dotnet testFrontend mocked Playwright tests and build:
bash
cd frontend
npm run test:mocked
npm run buildDocs build:
bash
cd docs
npm run buildDocker Compose build:
bash
docker compose buildCI Quality Gate
GitHub Actions runs .github/workflows/quality-gate.yml on every pull request and on pushes to main.
The workflow has these required jobs:
| Job | Commands |
|---|---|
backend-tests | dotnet restore, dotnet test --no-restore |
frontend-mocked-tests | npm ci, npx playwright install --with-deps chromium, npm run test:mocked |
frontend-build | npm ci, npm run build |
docs-build | npm ci, npm run build |
docker-compose-build | docker compose build |
Any failed command fails its job. Any failed job fails the workflow and marks the pull request check as failed.
Branch Protection
Configure GitHub branch protection for main so pull requests require these status checks before merge:
backend-testsfrontend-mocked-testsfrontend-builddocs-builddocker-compose-build
The repository does not store branch protection settings in code, so this is configured in GitHub repository settings.
Reproducing CI Failures
Run the same command locally from the directory shown in the failed GitHub Actions log. Use npm ci instead of npm install when reproducing frontend or docs CI exactly, because CI installs from the committed lockfiles.
If a mocked Playwright test fails:
- Run
cd frontend && npm run test:mocked. - Check the Playwright trace or screenshot from the failed test output.
- Keep the test mocked; do not make it depend on the live backend, Syrve/iiko, real bank files, or real bank credentials.
- Update
frontend/tests/helpers/mockApi.tsor the tested UI contract when the mocked API surface changed intentionally.
If Docker build fails:
- Run
docker compose configto confirm the composed file is valid. - Run
docker compose buildfrom the repository root. - The current root compose file includes
docker-compose.dev.yml, which defines PostgreSQL with environment variables. CI provides safe non-secret defaults forPOSTGRES_DB,POSTGRES_USER, andPOSTGRES_PASSWORD. - Do not commit secrets. Add only safe defaults to CI or document required local variables in
.env.exampleand deployment docs.