diff --git a/.github/services/s3/minio/action.yml b/.github/services/s3/minio/action.yml new file mode 100644 index 0000000..2ec90b9 --- /dev/null +++ b/.github/services/s3/minio/action.yml @@ -0,0 +1,16 @@ +name: minio_s3 + +runs: + using: "composite" + steps: + - name: Setup MinIO Server + shell: bash + working-directory: fixtures/s3 + run: docker compose -f docker-compose-minio.yml up -d --wait + - name: Setup test bucket + shell: bash + env: + AWS_ACCESS_KEY_ID: "minioadmin" + AWS_SECRET_ACCESS_KEY: "minioadmin" + AWS_EC2_METADATA_DISABLED: "true" + run: aws --endpoint-url http://127.0.0.1:9000/ s3 mb s3://test diff --git a/.github/workflows/s3_integration_test.yml b/.github/workflows/s3_integration_test.yml new file mode 100644 index 0000000..bf51dae --- /dev/null +++ b/.github/workflows/s3_integration_test.yml @@ -0,0 +1,30 @@ +name: S3 integration test + +on: + schedule: # execute every 24 hours + - cron: "* */24 * * *" + workflow_dispatch: + +jobs: + plan: + runs-on: ubuntu-latest + steps: + - name: 'Checkout codes' + uses: actions/checkout@v4 + with: + # fetch depth set to 0 to make sure we have correct diff result. + fetch-depth: 0 + + - name: Setup Rust toolchain + uses: ./.github/actions/setup + + - name: Setup Minio + uses: ./.github/services/s3/minio + + - name: 'Run integration test for s3' + shell: bash + run: | + cargo build --release + ls + pwd + python3 tests/integration_test.py 12000 s3 ./target/release/replited