From 9368e80abedba7953124a98bd3386607d137c8c3 Mon Sep 17 00:00:00 2001 From: phoenix Date: Fri, 7 Aug 2026 11:19:12 -0400 Subject: [PATCH] ci: Maybe this time --- .github/workflows/pr.yml | 48 ++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index f14f75b..de5ecaa 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -27,15 +27,19 @@ jobs: --health-timeout 5s --health-retries 5 - fake-s3: - image: lphoward/fake-s3:latest - ports: - - 4569:4569 + minio: + image: minio/minio:latest + env: + MINIO_ROOT_USER: test + MINIO_ROOT_PASSWORD: test options: >- - --health-cmd "curl -f http://localhost:4569 || exit 1" + --health-cmd "curl -f http://localhost:9000/minio/health/ready || exit 1" --health-interval 10s --health-timeout 5s --health-retries 5 + ports: + - 9000:9000 + command: server /data --console-address ":9001" steps: - uses: actions/checkout@v6 @@ -57,28 +61,29 @@ jobs: - name: Setup S3 run: | - # Install AWS CLI - sudo apt update - sudo apt search awscli - sudo apt install -y curl unzip - curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" - unzip awscliv2.zip - sudo ./aws/install - aws --version + # Download and install mc (MinIO Client) + wget https://dl.min.io/client/mc/release/linux-amd64/mc + chmod +x mc + sudo mv mc /usr/local/bin/ - # Wait for LocalStack - until curl -s http://localhost:4569; do - echo "Wating for localstack..." + # Wait for MinIO to be ready + until curl -s http://localhost:9000/minio/health/ready; do + echo "Waiting for MinIO..." sleep 2 done + echo "MinIO is ready!" - # CHOOSE A BUCKET NAME - this is whatever you want - BUCKET_NAME="soaricarus-ci-bucket" # <-- CHANGE THIS TO WHAT YOUR APP EXPECTS + # Configure mc to use MinIO + mc alias set localminio http://localhost:9000 test test # Create the bucket - aws --endpoint-url=http://localhost:4569 s3 mb s3://$BUCKET_NAME --region ${{ secrets.GARAGE_REGION }} + BUCKET_NAME="soaricarus-ci-bucket" + mc mb localminio/$BUCKET_NAME - # Set it as an environment variable for the test step + # Verify bucket was created + mc ls localminio/ + + # Set bucket name for test step echo "BUCKET_NAME=$BUCKET_NAME" >> $GITHUB_ENV env: AWS_ACCESS_KEY_ID: ${{ secrets.GARAGE_KEY_ID }} @@ -100,7 +105,8 @@ 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:3900" + S3_ENDPOINT_URL: "http://localhost:9000" + AWS_S3_FORCE_PATH_STYLE: "true" run: | mkdir -p ~/.ssh echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/soaricarus_models_deploy_key