stages: - test - deploy php_tests: stage: test image: php:8.3-cli-bookworm before_script: - apt-get update -qq - apt-get install -y --no-install-recommends python3 libonig-dev - docker-php-ext-install mbstring script: - find web -name '*.php' -not -path '*/artifacts/*' -print0 | xargs -0 -n1 php -l - php -r 'foreach (["pdo_sqlite", "curl", "mbstring", "openssl"] as $extension) { if (!extension_loaded($extension)) { fwrite(STDERR, "Missing extension " . $extension); exit(1); } }' - php web/tests/chess.php - php web/tests/colors.php - php web/tests/feedback.php - php web/tests/push.php - python3 web/tests/startup.py - python3 web/tests/integration.py frontend_checks: stage: test image: node:22-bookworm-slim script: - node --check web/assets/app.js - node --check web/assets/pwa.js - node --check web/sw.js - node web/tests/pwa.mjs - node --check web/tests/browser.mjs # A real FTP fixture verifies that mirroring preserves production data and secrets. deploy_tests: stage: test image: debian:bookworm-slim before_script: - apt-get update -qq - apt-get install -y --no-install-recommends python3 python3-pyftpdlib lftp ca-certificates openssh-client script: - python3 ci/test_deploy.py ftp_upload: stage: deploy image: debian:bookworm-slim resource_group: production environment: name: production rules: - if: '$CI_COMMIT_BRANCH == "master"' before_script: - apt-get update -qq - apt-get install -y --no-install-recommends python3 lftp ca-certificates openssh-client script: - python3 ci/deploy.py