Skip to content

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 test

Frontend mocked Playwright tests and build:

bash
cd frontend
npm run test:mocked
npm run build

Docs build:

bash
cd docs
npm run build

Docker Compose build:

bash
docker compose build

CI 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:

JobCommands
backend-testsdotnet restore, dotnet test --no-restore
frontend-mocked-testsnpm ci, npx playwright install --with-deps chromium, npm run test:mocked
frontend-buildnpm ci, npm run build
docs-buildnpm ci, npm run build
docker-compose-builddocker 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-tests
  • frontend-mocked-tests
  • frontend-build
  • docs-build
  • docker-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.ts or the tested UI contract when the mocked API surface changed intentionally.

If Docker build fails:

  • Run docker compose config to confirm the composed file is valid.
  • Run docker compose build from 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 for POSTGRES_DB, POSTGRES_USER, and POSTGRES_PASSWORD.
  • Do not commit secrets. Add only safe defaults to CI or document required local variables in .env.example and deployment docs.