add justfile for testing

This commit is contained in:
2026-04-03 10:30:07 +02:00
parent a885b624f9
commit 7d52d7dca8
2 changed files with 49 additions and 7 deletions
+49
View File
@@ -0,0 +1,49 @@
# Justfile for Migrate Database Changes Workflow
# Docs: https://just.systems/man/en/
# ------------------------------------------------------------------------------
# Global settings
# ------------------------------------------------------------------------------
# Load Env
set dotenv-load
set dotenv-required := true
# Use zsh
set shell := ["bash", "-cu"]
# ------------------------------------------------------------------------------
# Default
# ------------------------------------------------------------------------------
# List all Available recipes
[private]
default:
@just --list --unsorted
# ------------------------------------------------------------------------------
# Snake Script helpers
# ------------------------------------------------------------------------------
run:
"{{justfile_directory()}}/main.py"
# ------------------------------------------------------------------------------
# Testing helpers
# ------------------------------------------------------------------------------
test-constrictor:
#!/usr/bin/env bash
set -euo pipefail
BATTLESNAKE_CLI=battlesnake_cli_1.2.3_Linux_x86_64/battlesnake
$BATTLESNAKE_CLI play -W 11 -H 11 --name 'Python Starter Project' --url http://localhost:8000 -g constrictor --browser --minimumFood 0
test-seed:
#!/usr/bin/env bash
set -euo pipefail
BATTLESNAKE_CLI=battlesnake_cli_1.2.3_Linux_x86_64/battlesnake
$BATTLESNAKE_CLI play -W 11 -H 11 --name 'Python Starter Project' --url http://localhost:8000 -g solo --browser --seed 1713099635738952360
export-dataset input="data" output="data/dataset/good_moves.jsonl":
python -m server.DatasetExporter --input "{{input}}" --output "{{output}}"