ATS-openenv / scripts /pre_submission_validate.sh
Keshavj-13
fix(tooling): make submission scripts executable and shell-friendly
5407a55
Raw History Blame Contribute Delete
719 Bytes
#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_DIR_INPUT="${1:-$SCRIPT_DIR/..}"
REPO_DIR="$(cd "$REPO_DIR_INPUT" && pwd)"
PING_URL="${PING_URL:-}"
echo "Step 0/5: Checking release branch hygiene"
bash "$REPO_DIR/scripts/check_release_hygiene.sh" "$REPO_DIR"
if [ -n "$PING_URL" ]; then
echo "Step 1/5: Pinging deployed Space"
python "$REPO_DIR/scripts/ping_env.py" "$PING_URL"
fi
echo "Step 2/5: Building Docker image"
docker build "$REPO_DIR"
echo "Step 3/5: Running OpenEnv validation"
python -m openenv.cli validate "$REPO_DIR"
echo "Step 4/5: Running task graders"
python "$REPO_DIR/scripts/run_graders.py"
echo "Validation completed successfully."