cloud trial: set HOME/PATH for cloud-init, unit tests non-fatal
ci / test (3.12) (push) Failing after 8s
ci / test (3.13) (push) Failing after 10s

The first run stopped after 1 minute (HOME unbound under set -u) and
terminated itself as designed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01814GKVzZVL3FuF3DeiZXhv
This commit is contained in:
kemalandClaude Opus 5.5 committed 2026-09-27 19:36:49 +01:00
1 parent 150650424c
commit f52313fc93
1 file changed
+3 -2
+3 -2
View File
@@ -9,6 +9,8 @@
# so nothing keeps costing money afterwards. A CloudWatch alarm (layer 3) terminates an idle instance from # so nothing keeps costing money afterwards. A CloudWatch alarm (layer 3) terminates an idle instance from
# outside, in case the OS hangs. # outside, in case the OS hangs.
set -uo pipefail set -uo pipefail
export HOME=/root # cloud-init runs user-data without HOME
export PATH="/root/.local/bin:/snap/bin:$PATH"
BUCKET="__BUCKET__" BUCKET="__BUCKET__"
RUN="__RUN__" RUN="__RUN__"
MAX_MINUTES="__MAX_MINUTES__" MAX_MINUTES="__MAX_MINUTES__"
@@ -40,7 +42,6 @@ mkdir -p /work && cd /work
$S3 cp "s3://$BUCKET/$RUN/repo.tar.gz" . --only-show-errors $S3 cp "s3://$BUCKET/$RUN/repo.tar.gz" . --only-show-errors
mkdir repo && tar -xzf repo.tar.gz -C repo && cd repo mkdir repo && tar -xzf repo.tar.gz -C repo && cd repo
curl -LsSf https://astral.sh/uv/install.sh | sh curl -LsSf https://astral.sh/uv/install.sh | sh
export PATH="$HOME/.local/bin:$PATH"
uv venv -q --python 3.12 .venv && uv pip install -q -e ".[dev]" uv venv -q --python 3.12 .venv && uv pip install -q -e ".[dev]"
mkdir -p refs && git clone -q --depth 1 https://github.com/Illumina/BeadArrayFiles.git refs/BeadArrayFiles mkdir -p refs && git clone -q --depth 1 https://github.com/Illumina/BeadArrayFiles.git refs/BeadArrayFiles
@@ -54,7 +55,7 @@ $S3 cp --no-sign-request "$SRC/Omni25_idats_gtcs_2141_samples.tgz" - | pigz -dc
echo "=== extracted $(du -sh $D/data | cut -f1) at $(date -u +%T) ===" echo "=== extracted $(du -sh $D/data | cut -f1) at $(date -u +%T) ==="
echo "=== validation $(date -u +%T) ===" echo "=== validation $(date -u +%T) ==="
.venv/bin/python -m pytest tests/unit -q -p no:cacheprovider .venv/bin/python -m pytest tests/unit -q -p no:cacheprovider || echo "unit tests reported failures (continuing)"
.venv/bin/python scripts/validate_p1_large.py --root $D/data --bpm $D/HumanOmni2.5-4v1-Multi_B.bpm \ .venv/bin/python scripts/validate_p1_large.py --root $D/data --bpm $D/HumanOmni2.5-4v1-Multi_B.bpm \
--egt $D/HumanOmni2.5-4v1-Multi_B.egt --csv $D/HumanOmni2.5-4v1_B.csv --out /work/summary.json \ --egt $D/HumanOmni2.5-4v1-Multi_B.egt --csv $D/HumanOmni2.5-4v1_B.csv --out /work/summary.json \
--workers "$(nproc)" || echo "validation reported differences (see summary.json)" --workers "$(nproc)" || echo "validation reported differences (see summary.json)"