Skip to content

Commit

Permalink
feat: add s3 integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
lichuang committed Oct 9, 2024
1 parent 1fbcb8c commit 2e2a3e9
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/services/s3/minio/action.yml
Original file line number Diff line number Diff line change
@@ -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
30 changes: 30 additions & 0 deletions .github/workflows/s3_integration_test.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 2e2a3e9

Please sign in to comment.