18 lines
916 B
Bash
Executable File
18 lines
916 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 --no-deps 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 - 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")"
|