Files
magnus e6150b9592
test-and-build / test (push) Successful in 3m59s
test-and-build / build (push) Successful in 1m54s
Record validated suspended Kubernetes rollout and CI setup
2026-10-03 21:45:11 +02:00

18 lines
921 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")/.."
# Only disposable containers; no production connection settings or published ports.
export COMPOSE_PROJECT_NAME="btcdata-archive-test-${GITHUB_RUN_ID:-$$}-${GITHUB_RUN_ATTEMPT:-1}"
compose=(docker compose -f tests/integration/compose.yaml)
trap '"${compose[@]}" down -v' EXIT
"${compose[@]}" up -d postgres rustfs
"${compose[@]}" create tests
runner="$("${compose[@]}" ps -aq tests)"
# CI's workspace is inside its job container, not on the Docker host. Copy only
# test inputs; never bind-mount the workspace or copy .env, .git, or production secrets.
COPYFILE_DISABLE=1 tar -cf - pyproject.toml requirements-test.lock src tests sql \
scripts/archive-old-weeks.sh scripts/list-archives.sh scripts/wait-test-infrastructure.py \
| docker cp - "$runner:/app"
docker start --attach "$runner"
exit "$(docker inspect --format '{{.State.ExitCode}}' "$runner")"