From 847754a6cba9eb1817a356478e08099f611f7924 Mon Sep 17 00:00:00 2001 From: Stefaan Verscheure Date: Thu, 13 Jun 2024 19:20:59 +0200 Subject: [PATCH] add minio to github actions to use in test suite add --quiet --- .github/workflows/go.yml | 7 +++++++ test.sh | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 9c1056d..0322513 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -30,5 +30,12 @@ jobs: go-version: ${{ matrix.go }} - name: Build run: go build -v ./... + - name: Start MinIO (emulates S3) + run: | + wget -q https://dl.min.io/server/minio/release/linux-amd64/minio + chmod +x minio + export MINIO_ROOT_USER=minioadmin + export MINIO_ROOT_PASSWORD=minioadmin + ./minio server /tmp/minio --address 127.0.0.1:4730 --quiet & - name: Test run: ./test.sh diff --git a/test.sh b/test.sh index dca8a9e..29ce50b 100755 --- a/test.sh +++ b/test.sh @@ -3,10 +3,10 @@ if [ ! -z "$SIMPLEBLOB_TEST_S3_CONFIG" ]; then echo "* Using existing SIMPLEBLOB_TEST_S3_CONFIG=$SIMPLEBLOB_TEST_S3_CONFIG" elif curl -v --connect-timeout 2 http://localhost:4730/ 2>&1 | grep --silent MinIO ; then - echo "* Using MinIO in Docker Compose for tests" + echo "* Using MinIO on localhost for tests" export SIMPLEBLOB_TEST_S3_CONFIG="$PWD/docker/test-minio.json" else - echo "* MinIO not running in Docker Compose, skipping S3 tests" + echo "* MinIO not running on localhost, skipping S3 tests" fi set -ex