feat(ops): automate backups and private CV benchmarks
CI and Deploy / test (push) Successful in 6m47s
CI and Deploy / deploy (push) Failing after 25s

This commit is contained in:
cesnimda
2026-09-02 00:49:06 +02:00
parent bd7fa05b8c
commit de85492373
10 changed files with 301 additions and 46 deletions
+16
View File
@@ -4,16 +4,32 @@ set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
OUTPUT_DIR="${CV_BENCHMARK_OUTPUT_DIR:-$ROOT_DIR/tmp/cv-benchmarks/latest}"
APPROVED_DIR="${CV_BENCHMARK_APPROVED_DIR:-$ROOT_DIR/tmp/cv-benchmarks/approved-fixtures}"
CORPUS_DIR="${CV_BENCHMARK_CORPUS_DIR:-/home/pi/cvs}"
if [[ ! -d "$CORPUS_DIR" ]]; then
echo "CV corpus directory not found: $CORPUS_DIR" >&2
exit 1
fi
if ! find "$CORPUS_DIR" -maxdepth 1 -type f \( -iname '*.pdf' -o -iname '*.docx' -o -iname '*.txt' -o -iname '*.md' \) -print -quit | grep -q .; then
echo "No supported CV files were found in: $CORPUS_DIR" >&2
exit 1
fi
mkdir -p "$OUTPUT_DIR" "$APPROVED_DIR"
echo "CV benchmark corpus: $CORPUS_DIR"
echo "CV benchmark output: $OUTPUT_DIR"
echo "Approved fixtures: $APPROVED_DIR"
CV_BENCHMARK_CORPUS_DIR="$CORPUS_DIR" \
CV_BENCHMARK_OUTPUT_DIR="$OUTPUT_DIR" \
CV_BENCHMARK_APPROVED_DIR="$APPROVED_DIR" \
dotnet test "$ROOT_DIR/JobTrackerApi.Tests/JobTrackerApi.Tests.csproj" --filter CvCorpusHarnessTests
test -s "$OUTPUT_DIR/index.json"
test -s "$OUTPUT_DIR/report.md"
if [[ -f "$OUTPUT_DIR/report.md" ]]; then
echo
echo "Benchmark report written to: $OUTPUT_DIR/report.md"