From 63b25380d89761068cfad1fae2a563a95c777707 Mon Sep 17 00:00:00 2001 From: g-roliveira <125938946+g-roliveira@users.noreply.github.com> Date: Mon, 16 Feb 2026 10:58:33 -0300 Subject: [PATCH] ci: add MinIO integration test job for S3-compatible mode --- .github/workflows/build.yml | 59 +++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3e7818ec..bbdd51c7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -227,3 +227,62 @@ jobs: run: | echo "### :tada: Checks Passed!" >> "${GITHUB_STEP_SUMMARY}" echo "" >> "${GITHUB_STEP_SUMMARY}" + + s3-compatible-minio: + name: S3-Compatible Integration (MinIO) + runs-on: ubuntu-24.04 + timeout-minutes: 45 + + steps: + - name: "Install dependencies Ubuntu" + run: sudo apt-get update && sudo apt-get install -y --no-install-recommends curl openssl build-essential libmariadb-dev-compat libpq-dev libssl-dev pkg-config + + - name: "Checkout" + uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 #v6.0.0 + with: + persist-credentials: false + fetch-depth: 0 + + - name: "Install rust-toolchain version" + uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # master @ Dec 16, 2025, 6:11 PM GMT+1 + with: + toolchain: stable + + - name: "Show environment" + run: | + rustc -vV + cargo -vV + + - name: Rust Caching + uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2 + with: + prefix-key: "v2025.09-rust" + + - name: Start MinIO + run: | + docker run -d --name minio \ + -p 9000:9000 \ + -e MINIO_ROOT_USER=minioadmin \ + -e MINIO_ROOT_PASSWORD=minioadmin \ + quay.io/minio/minio:RELEASE.2025-07-23T15-54-02Z \ + server /data --console-address ":9001" + + for i in {1..30}; do + if curl -fsS "http://127.0.0.1:9000/minio/health/live" >/dev/null; then + break + fi + sleep 1 + done + + docker run --rm --network host quay.io/minio/mc:RELEASE.2025-06-13T11-33-47Z \ + sh -c "mc alias set local http://127.0.0.1:9000 minioadmin minioadmin && mc mb --ignore-existing local/vaultwarden-test" + + - name: Run MinIO integration test + env: + VW_S3_MINIO_ENDPOINT: "http://127.0.0.1:9000" + VW_S3_MINIO_BUCKET: "vaultwarden-test" + VW_S3_MINIO_ROOT: "/vaultwarden-integration" + VW_S3_MINIO_ACCESS_KEY: "minioadmin" + VW_S3_MINIO_SECRET_KEY: "minioadmin" + run: | + cargo test --profile ci --features sqlite,s3 test_s3_minio_integration_put_get_delete -- --ignored