add dockerfile and docker build workflow support (#5) #16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Integration Tests | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: # Allow manual triggering | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| jobs: | |
| integration: | |
| name: Integration Tests | |
| runs-on: ubuntu-latest | |
| # Don't block PR merges - integration tests are supplementary | |
| continue-on-error: true | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Start MinIO | |
| run: | | |
| docker run -d --name minio \ | |
| -p 9000:9000 \ | |
| -e MINIO_ROOT_USER=accesskey \ | |
| -e MINIO_ROOT_PASSWORD=secretkey \ | |
| minio/minio server /data | |
| - name: Wait for MinIO | |
| run: | | |
| echo "Waiting for MinIO to start..." | |
| for i in {1..30}; do | |
| if curl -sf http://localhost:9000/minio/health/live > /dev/null 2>&1; then | |
| echo "MinIO is ready!" | |
| exit 0 | |
| fi | |
| echo "Waiting for MinIO... ($i/30)" | |
| sleep 2 | |
| done | |
| echo "MinIO failed to start" | |
| docker logs minio | |
| exit 1 | |
| - name: Run integration tests | |
| run: cargo test --package rustfs-cli --test integration --features integration -- --test-threads=1 | |
| env: | |
| TEST_S3_ENDPOINT: http://localhost:9000 | |
| TEST_S3_ACCESS_KEY: accesskey | |
| TEST_S3_SECRET_KEY: secretkey | |
| - name: Show MinIO logs on failure | |
| if: failure() | |
| run: docker logs minio 2>&1 | tail -100 | |
| golden: | |
| name: Golden Tests | |
| runs-on: ubuntu-latest | |
| # Don't block PR merges | |
| continue-on-error: true | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Run golden tests | |
| run: cargo test --package rustfs-cli --test golden --features golden | |
| env: | |
| # Golden tests use isolated config dir, no real S3 needed for alias tests | |
| RC_CONFIG_DIR: ${{ runner.temp }}/rc-test-config |