name: Integration Cluster CLI
on:
pull_request:
jobs:
rust_checks:
name: Rust Checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Rust
uses: dtolnay/rust-toolchain@1.95.0
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cluster-cli-rust-checks-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Check formatting
run: cargo fmt --all --check
- name: Lint with clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Run Rust tests
run: cargo test --all-targets --all-features
cluster_cli:
name: Cluster CLI
needs: rust_checks
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- uses: actions/checkout@v4
- name: Set up Rust
uses: dtolnay/rust-toolchain@1.95.0
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cluster-cli-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-integration.txt
- name: Run cluster CLI integration lane
env:
RUN_CLUSTER_CLI: "1"
run: |
python -m pytest integration_tests/cluster_cli/tests -m cluster_cli
- name: Upload cluster CLI artifacts
if: always()
uses: actions/upload-artifact@v7
with:
name: cluster-cli-artifacts-${{ github.run_id }}
path: integration_tests/artifacts/cluster_cli/