Skip to content

Storage Integration

Storage Integration #2

name: Server Storage Tests
on:
push:
branches:
- main
- master
pull_request:
env:
RUSTFLAGS: -C debuginfo=0 # Do not produce debug symbols to keep memory usage down
# aws args
AWS_REGION: "${{ secrets.AWS_REGION }}"
PYTHON_VERSION: "3.11"
AWS_CLOUD_BUCKET_NAME: "${{ secrets.AWS_CLOUD_BUCKET_NAME }}"
# gcs args
GOOGLE_ACCOUNT_JSON_BASE64: ${{ secrets.GOOGLE_ACCOUNT_JSON_BASE64 }}
GCS_CLOUD_BUCKET_NAME: "${{ secrets.GCS_CLOUD_BUCKET_NAME }}"
#azure args
AZURE_STORAGE_ACCOUNT: ${{ secrets.AZURE_STORAGE_ACCOUNT }}
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
AZURE_CLOUD_BUCKET_NAME: "${{ secrets.AZURE_CLOUD_BUCKET_NAME }}"
jobs:
aws-lints-client-test:
permissions:
id-token: write
contents: read
env:
OPSML_STORAGE_URI: s3://${{ secrets.AWS_CLOUD_BUCKET_NAME }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v3
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: ${{ env.AWS_REGION }}
- name: Set up Rust
run: rustup override set stable && rustup update
- name: Install clippy
run: rustup component add clippy
- name: Cache Rust
uses: Swatinem/rust-cache@v2
- name: Run cargo clippy
working-directory: ./crates
run: cargo clippy --workspace --all-targets -- -D warnings
- name: Tests
working-directory: ./crates
run: |
make test.storage.aws.server
env:
RUST_BACKTRACE: 1
gcs-client-test:
permissions:
id-token: write
contents: read
env:
OPSML_STORAGE_URI: gs://${{ secrets.GCS_CLOUD_BUCKET_NAME }}
GOOGLE_ACCOUNT_JSON_BASE64: ${{ secrets.GOOGLE_ACCOUNT_JSON_BASE64 }}
runs-on: ubuntu-latest
needs: aws-lints-client-test
steps:
- uses: actions/checkout@v4
- name: Cache Rust
uses: Swatinem/rust-cache@v2
- name: Set up Rust
run: rustup override set stable && rustup update
- name: Tests
working-directory: ./crates
run: |
make test.storage.gcs.server
env:
RUST_BACKTRACE: 1
azure-client-test:
needs: gcs-client-test
permissions:
id-token: write
contents: read
env:
OPSML_STORAGE_URI: az://${{ secrets.AZURE_CLOUD_BUCKET_NAME }}
AZURE_STORAGE_ACCOUNT: ${{ secrets.AZURE_STORAGE_ACCOUNT }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache Rust
uses: Swatinem/rust-cache@v2
- name: "Az CLI login"
uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Set up Rust
run: rustup override set stable && rustup update
- name: Tests
working-directory: ./crates
run: |
make test.storage.azure.server
env:
RUST_BACKTRACE: 1
local-client-test:
needs: azure-client-test
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Rust
run: rustup override set stable && rustup update
- name: Cache Rust
uses: Swatinem/rust-cache@v2
- name: Tests
working-directory: ./crates
run: |
make test.storage.local.server
env:
RUST_BACKTRACE: 1