Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Add integration tests for s3 #1513

Merged
merged 2 commits into from
Dec 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,74 @@ jobs:
/home/runner/.cargo/bin/sccache --show-stats

/home/runner/.cargo/bin/sccache --show-stats | grep -e "Cache hits\s*[1-9]"

s3_minio:
runs-on: ubuntu-latest
needs: build

# Setup minio server
services:
minio:
image: wktk/minio-server
ports:
- 9000:9000
env:
MINIO_ACCESS_KEY: "minioadmin"
MINIO_SECRET_KEY: "minioadmin"

steps:
- name: Clone repository
uses: actions/checkout@v3

- name: Setup test bucket
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

- name: Install rust
uses: ./.github/actions/rust-toolchain
with:
toolchain: "stable"

- uses: actions/download-artifact@v3
with:
name: integration-tests
path: /home/runner/.cargo/bin/
- name: Chmod for binary
run: chmod +x /home/runner/.cargo/bin/sccache

- name: Test
run: cargo clean && cargo build
env:
RUST_BACKTRACE: full
RUST_LOG: debug
RUSTC_WRAPPER: /home/runner/.cargo/bin/sccache
SCCACHE_BUCKET: test
SCCACHE_ENDPOINT: http://127.0.0.1:9000/
AWS_ACCESS_KEY_ID: "minioadmin"
AWS_SECRET_ACCESS_KEY: "minioadmin"

- name: Output
run: |
/home/runner/.cargo/bin/sccache --show-stats

/home/runner/.cargo/bin/sccache --show-stats | grep s3

- name: Test Twice for Cache Read
run: cargo clean && cargo build
env:
RUST_BACKTRACE: full
RUST_LOG: debug
RUSTC_WRAPPER: /home/runner/.cargo/bin/sccache
SCCACHE_BUCKET: test
SCCACHE_ENDPOINT: http://127.0.0.1:9000/
AWS_ACCESS_KEY_ID: "minioadmin"
AWS_SECRET_ACCESS_KEY: "minioadmin"

- name: Output
run: |
/home/runner/.cargo/bin/sccache --show-stats

/home/runner/.cargo/bin/sccache --show-stats | grep -e "Cache hits\s*[1-9]"