diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 4804fb1..28f2daf 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -27,15 +27,19 @@ jobs: --health-timeout 5s --health-retries 5 - minio: - image: minio/minio:latest + # Use fake-s3 instead of MinIO - simpler and more reliable + s3: + image: adobe/s3mock:latest env: - MINIO_ROOT_USER: test - MINIO_ROOT_PASSWORD: test + initialBuckets: soaricarus-ci-bucket + defaultRegion: ${{ secreats.GARAGE_REGION }} ports: - - 9000:9000 - command: server /data --console-address ":9001" - + - 9090:9090 + options: >- + --health-cmd "curl -f http://localhost:9090/ || exit 1" + --health-interval 10s + --health-timeout 5s + --health-retries 5 steps: - uses: actions/checkout@v6 - uses: actions-rust-lang/setup-rust-toolchain@v1 @@ -56,24 +60,9 @@ jobs: - name: Setup S3 run: | - # Download and install mc - wget https://dl.min.io/client/mc/release/linux-amd64/mc - chmod +x mc - sudo mv mc /usr/local/bin/ - - # Simple wait - just try connecting - echo "Waiting for MinIO..." - sleep 10 # Give it a moment to start - - # Check if it's running - curl -v http://localhost:9000 || echo "Connection failed" - - # Try to configure and create bucket - mc alias set localminio http://localhost:9000 test test || echo "mc config failed" - mc mb localminio/soaricarus-ci-bucket || echo "Bucket creation failed" - mc ls localminio/ - - echo "S3_BUCKET_NAME=soaricarus-ci-bucket" >> $GITHUB_ENV + # No need to install mc or create bucket - S3Mock creates it automatically! + echo "S3_BUCKET_NAME=soaricarus-ci-bucket" >> $GITHUB_ENV + echo "S3_ENDPOINT_URL=http://localhost:9090" >> $GITHUB_ENV env: AWS_ACCESS_KEY_ID: ${{ secrets.GARAGE_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.GARAGE_SECRET }} @@ -94,7 +83,7 @@ jobs: GARAGE_DEFAULT_SECRET_KEY: ${{ secrets.GARAGE_SECRET }} GARAGE_S3_REGION: ${{ secrets.GARAGE_REGION }} S3_BUCKET_NAME: "soaricarus-ci-bucket" - S3_ENDPOINT_URL: "http://localhost:9000" + S3_ENDPOINT_URL: "http://localhost:9090" AWS_S3_FORCE_PATH_STYLE: "true" run: | mkdir -p ~/.ssh