#!/usr/bin/env bash set -Eeuo pipefail ROOT="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)" cd -- "${ROOT}" echo "==> Checking start.sh line endings (LF)" python3 - <<'PY' from pathlib import Path data = Path("start.sh").read_bytes() if b"\r\n" in data or data.count(b"\r"): raise SystemExit("ERROR: start.sh contains CR/CRLF line endings") PY echo "==> Checking start.sh is executable" test -x start.sh echo "==> bash -n start.sh" bash -n start.sh if command -v shellcheck >/dev/null 2>&1; then echo "==> shellcheck start.sh" shellcheck start.sh else echo "WARNING: shellcheck not installed; skipping" fi echo "==> Creating clean virtual environment" rm -rf .venv-ci python3 -m venv .venv-ci .venv-ci/bin/python -m pip install --upgrade pip .venv-ci/bin/python -m pip install -r requirements-server.txt pytest echo "==> compileall" .venv-ci/bin/python -m compileall -q . echo "==> pytest" .venv-ci/bin/python -m pytest -q echo "All Linux compatibility checks passed."