New HTTP Storage instance #4653
Workflow file for this run
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
| # This is mostly copied from the rust-analyzer repo | |
| # https://github.com/rust-lang/rust-analyzer/blob/12e7aa3132217cc6a6c1151d468be35d7b365999/.github/workflows/ci.yaml | |
| name: Rust CI | |
| on: | |
| pull_request: | |
| types: [opened, reopened, synchronize, labeled] | |
| push: | |
| branches: | |
| - main | |
| - 'support/**' | |
| schedule: | |
| # three times a day to run the integration tests that take a long time | |
| - cron: '33 3,10,15 * * *' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_INCREMENTAL: 0 | |
| CARGO_NET_RETRY: 10 | |
| CI: 1 | |
| RUST_BACKTRACE: short | |
| RUSTFLAGS: "-D warnings -W unreachable-pub -W bare-trait-objects" | |
| RUSTUP_MAX_RETRIES: 10 | |
| RUST_CHANNEL: '1.89.0' | |
| jobs: | |
| rust: | |
| name: Rust CI | |
| timeout-minutes: 20 | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| working-directory: ./ | |
| #permissions: | |
| #contents: read | |
| #actions: read | |
| #pull-requests: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, ubuntu-24.04-arm, macos-13, macos-latest] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - name: Stand up docker services | |
| if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-24.04-arm' | |
| run: | | |
| docker compose up -d | |
| - name: Wait for containers to be ready | |
| if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-24.04-arm' | |
| run: | | |
| for _ in {1..30}; do | |
| if curl --silent --fail http://localhost:9000/minio/health/live; then | |
| break | |
| fi | |
| sleep 1 | |
| done | |
| docker compose exec -T minio mc alias set minio http://minio:9000 minio123 minio123 | |
| for _ in {1..60}; do | |
| if curl --silent --fail "http://localhost:10000/devstoreaccount1/testcontainer?sv=2023-01-03&ss=btqf&srt=sco&spr=https%2Chttp&st=2025-01-06T14%3A53%3A30Z&se=2035-01-07T14%3A53%3A00Z&sp=rwdftlacup&sig=jclETGilOzONYp4Y0iK9SpVRLGyehaS5lg5booJ9VYA%3D&restype=container"; then | |
| break | |
| fi | |
| sleep 1 | |
| done | |
| - name: Install Just | |
| if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-24.04-arm' | |
| run: sudo snap install --edge --classic just | |
| - name: Install Rust toolchain | |
| run: | | |
| rustup update --no-self-update ${{ env.RUST_CHANNEL }} | |
| rustup component add --toolchain ${{ env.RUST_CHANNEL }} rustfmt rust-src clippy | |
| rustup default ${{ env.RUST_CHANNEL }} | |
| - name: Cache Dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| # workspaces: "rust -> target" | |
| key: ${{ env.RUST_CHANNEL }} | |
| - name: Run tests with Docker services | |
| if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-24.04-arm' | |
| env: | |
| RUST_LOG: trace | |
| R2_BUCKET: ${{ secrets.R2_BUCKET }} | |
| R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }} | |
| R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }} | |
| R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }} | |
| AWS_BUCKET: ${{ secrets.AWS_BUCKET }} | |
| AWS_REGION: ${{ secrets.AWS_REGION }} | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| TIGRIS_BUCKET: ${{ secrets.TIGRIS_BUCKET }} | |
| TIGRIS_REGION: ${{ secrets.TIGRIS_REGION }} | |
| TIGRIS_ACCESS_KEY_ID: ${{ secrets.TIGRIS_ACCESS_KEY_ID }} | |
| TIGRIS_SECRET_ACCESS_KEY: ${{ secrets.TIGRIS_SECRET_ACCESS_KEY }} | |
| run: | | |
| just compile-tests "--locked" | |
| just test | |
| - name: Run doc tests | |
| if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-24.04-arm' | |
| run: | | |
| just doctest | |
| - name: Run examples | |
| if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-24.04-arm' | |
| run: | | |
| just run-all-examples | |
| - name: Run unit tests only | |
| if: matrix.os != 'ubuntu-latest' && matrix.os != 'ubuntu-24.04-arm' | |
| run: | | |
| cargo test --lib | |
| - name: Run integration tests against object stores | |
| if: github.event_name == 'cron' | |
| env: | |
| R2_BUCKET: ${{ secrets.R2_BUCKET }} | |
| R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }} | |
| R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }} | |
| R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }} | |
| AWS_BUCKET: ${{ secrets.AWS_BUCKET }} | |
| AWS_REGION: ${{ secrets.AWS_REGION }} | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| TIGRIS_BUCKET: ${{ secrets.TIGRIS_BUCKET }} | |
| TIGRIS_REGION: ${{ secrets.TIGRIS_REGION }} | |
| TIGRIS_ACCESS_KEY_ID: ${{ secrets.TIGRIS_ACCESS_KEY_ID }} | |
| TIGRIS_SECRET_ACCESS_KEY: ${{ secrets.TIGRIS_SECRET_ACCESS_KEY }} | |
| run: | | |
| cargo test --all --all-targets -- --ignored |