Skip to content

Commit f2a6456

Browse files
Dmitrii Kataraevstepmikhaylov
authored andcommitted
ci: provide MinIO + ROCKETRIDE_TEST_S3_* for S3Store tests (Linux)
Wires a local MinIO into the Linux build's Test step so the S3Store integration tests (gated on boto3 + ROCKETRIDE_TEST_S3_*) run in CI. Ubuntu-only (service containers aren't available on win/macOS), and continue-on-error + late var-export keep a MinIO hiccup from ever blocking a CI/release build (tests skip cleanly). Preinstalls boto3 (an optional extra) so the suite actually activates. Tests themselves land via Stepan's feat/deploy-v2 (commit 027bb64).
1 parent 9f8c705 commit f2a6456

1 file changed

Lines changed: 48 additions & 0 deletions

File tree

.github/workflows/_build.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,54 @@ jobs:
147147
BUILD_STAMP: ${{ inputs.build_stamp }}
148148
run: ${{ matrix.builder_cmd }} build --verbose --autoinstall --version="$FULL_VERSION" --hash="$BUILD_HASH" --stamp="$BUILD_STAMP" ${{ inputs.nodownload && '--nodownload' || '' }}
149149

150+
# -----------------------------------------------------------------------
151+
# MinIO for the S3Store integration tests (Linux only).
152+
#
153+
# packages/ai/tests/ai/account/test_store.py gates the live-S3 cases on
154+
# `pytest.importorskip('boto3')` + ROCKETRIDE_TEST_S3_ACCESS_KEY_ID, so
155+
# they skip unless a real S3 endpoint is wired up. We give them a local
156+
# MinIO. Service containers / docker aren't available on the win/macOS
157+
# runners, so this is Ubuntu-only; the tests skip cleanly elsewhere.
158+
#
159+
# continue-on-error + writing the test vars to $GITHUB_ENV ONLY after
160+
# MinIO is confirmed healthy and the bucket exists: if anything here
161+
# fails the vars stay unset → the S3 tests skip → a MinIO hiccup can
162+
# never block a CI or release build.
163+
# (minio:latest is intentional — a stale pinned RELEASE tag would 404
164+
# and silently skip the suite; revisit pinning once we mirror the image.)
165+
# -----------------------------------------------------------------------
166+
- name: Start MinIO for S3Store tests (Linux)
167+
if: matrix.platform == 'ubuntu' && inputs.codeql == false
168+
continue-on-error: true
169+
env:
170+
AWS_ACCESS_KEY_ID: minioadmin
171+
AWS_SECRET_ACCESS_KEY: minioadmin
172+
AWS_DEFAULT_REGION: us-east-1
173+
run: |
174+
set -euo pipefail
175+
docker run -d --name minio -p 9000:9000 \
176+
-e MINIO_ROOT_USER=minioadmin -e MINIO_ROOT_PASSWORD=minioadmin \
177+
minio/minio:latest server /data
178+
for i in $(seq 1 30); do
179+
if curl -fsS http://localhost:9000/minio/health/live >/dev/null 2>&1; then ready=1; break; fi
180+
sleep 2
181+
done
182+
[ "${ready:-}" = "1" ] || { echo "MinIO did not become ready"; docker logs minio || true; exit 1; }
183+
# Create the bucket + smoke a put/get so the backend is proven even
184+
# before the S3Store tests land on develop (they live on feat/deploy-v2).
185+
aws --endpoint-url http://localhost:9000 s3 mb s3://rocketride-test
186+
printf 'minio smoke\n' > /tmp/minio-smoke.txt
187+
aws --endpoint-url http://localhost:9000 s3 cp /tmp/minio-smoke.txt s3://rocketride-test/smoke.txt
188+
aws --endpoint-url http://localhost:9000 s3 ls s3://rocketride-test/
189+
# Expose the test vars (read by test_store.py) only now that S3 is live.
190+
{
191+
echo "ROCKETRIDE_TEST_S3_ENDPOINT=http://localhost:9000"
192+
echo "ROCKETRIDE_TEST_S3_REGION=us-east-1"
193+
echo "ROCKETRIDE_TEST_S3_ACCESS_KEY_ID=minioadmin"
194+
echo "ROCKETRIDE_TEST_S3_SECRET_ACCESS_KEY=minioadmin"
195+
echo "ROCKETRIDE_TEST_S3_BUCKET=rocketride-test"
196+
} >> "$GITHUB_ENV"
197+
150198
- name: Test
151199
if: inputs.codeql == false
152200
# Integration tests boot a local server on :5565 and connect a test

0 commit comments

Comments
 (0)