|
| 1 | +name: MinIO Rust Library |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ "master" ] |
| 6 | + pull_request: |
| 7 | + branches: [ "master" ] |
| 8 | + |
| 9 | +env: |
| 10 | + RUST_LOG: debug |
| 11 | + CARGO_TERM_COLOR: always |
| 12 | + |
| 13 | +jobs: |
| 14 | + check-format: |
| 15 | + runs-on: ubuntu-latest |
| 16 | + steps: |
| 17 | + - uses: actions/checkout@v4 |
| 18 | + - name: Check format |
| 19 | + run: | |
| 20 | + cargo fmt --all -- --check |
| 21 | +
|
| 22 | + clippy: |
| 23 | + runs-on: ubuntu-latest |
| 24 | + steps: |
| 25 | + - uses: actions/checkout@v4 |
| 26 | + - name: clippy |
| 27 | + run: cargo clippy --all-targets --all-features --workspace -- -D warnings |
| 28 | + test-multi-thread: |
| 29 | + runs-on: ubuntu-latest |
| 30 | + steps: |
| 31 | + - uses: actions/checkout@v4 |
| 32 | + - name: Start AIStor MinIO server |
| 33 | + run: | |
| 34 | + wget --quiet https://dl.minio.io/aistor/minio/release/linux-amd64/minio |
| 35 | + chmod +x minio |
| 36 | + echo "MinIO Server Version:" |
| 37 | + ./minio --version |
| 38 | + mkdir -p /tmp/certs |
| 39 | + cp ./tests/public.crt ./tests/private.key /tmp/certs/ |
| 40 | + MINIO_CI_CD=true \ |
| 41 | + MINIO_LICENSE=${{ secrets.AISTOR_LICENSE }} \ |
| 42 | + MINIO_NOTIFY_WEBHOOK_ENABLE_miniojavatest=on \ |
| 43 | + MINIO_NOTIFY_WEBHOOK_ENDPOINT_miniojavatest=http://example.org/ \ |
| 44 | + ./minio server /tmp/test-xl/{1...4}/ --certs-dir /tmp/certs/ & |
| 45 | + sleep 10 |
| 46 | + - name: Run tests |
| 47 | + run: | |
| 48 | + export SERVER_ENDPOINT=localhost:9000 |
| 49 | + export ACCESS_KEY=${{ secrets.AISTOR_USER }} |
| 50 | + export SECRET_KEY=${{ secrets.AISTOR_LICENSE }} |
| 51 | + export ENABLE_HTTPS=1 |
| 52 | + export MINIO_SSL_CERT_FILE=./tests/public.crt |
| 53 | + MINIO_TEST_TOKIO_RUNTIME_FLAVOR="multi_thread" cargo test -- --nocapture |
| 54 | + test-current-thread: |
| 55 | + runs-on: ubuntu-latest |
| 56 | + steps: |
| 57 | + - uses: actions/checkout@v4 |
| 58 | + - name: Start AIStor MinIO server |
| 59 | + run: | |
| 60 | + wget --quiet https://dl.minio.io/aistor/minio/release/linux-amd64/minio |
| 61 | + chmod +x minio |
| 62 | + echo "MinIO Server Version:" |
| 63 | + ./minio --version |
| 64 | + mkdir -p /tmp/certs |
| 65 | + cp ./tests/public.crt ./tests/private.key /tmp/certs/ |
| 66 | + MINIO_CI_CD=true \ |
| 67 | + MINIO_LICENSE=${{ secrets.AISTOR_LICENSE }} \ |
| 68 | + MINIO_NOTIFY_WEBHOOK_ENABLE_miniojavatest=on \ |
| 69 | + MINIO_NOTIFY_WEBHOOK_ENDPOINT_miniojavatest=http://example.org/ \ |
| 70 | + ./minio server /tmp/test-xl/{1...4}/ --certs-dir /tmp/certs/ & |
| 71 | + sleep 10 |
| 72 | + - name: Run tests |
| 73 | + run: | |
| 74 | + export SERVER_ENDPOINT=localhost:9000 |
| 75 | + export ACCESS_KEY=${{ secrets.AISTOR_USER }} |
| 76 | + export SECRET_KEY=${{ secrets.AISTOR_LICENSE }} |
| 77 | + export ENABLE_HTTPS=1 |
| 78 | + export MINIO_SSL_CERT_FILE=./tests/public.crt |
| 79 | + MINIO_TEST_TOKIO_RUNTIME_FLAVOR="current_thread" cargo test -- --nocapture |
| 80 | +
|
| 81 | + build: |
| 82 | + runs-on: ubuntu-latest |
| 83 | + timeout-minutes: 5 |
| 84 | + steps: |
| 85 | + - uses: actions/checkout@v4 |
| 86 | + - name: Build |
| 87 | + run: | |
| 88 | + cargo --version |
| 89 | + cargo build --bins --examples --tests --benches --verbose |
0 commit comments