Allow clients to define custom callbacks to handle telemetry #3193
Workflow file for this run
This file contains 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: Tests | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
merge_group: | |
types: [ "checks_requested" ] | |
env: | |
RUST_BACKTRACE: 1 | |
CARGO_TERM_COLOR: always | |
CARGO_INCREMENTAL: 0 | |
RUST_FEATURES: fuse_tests | |
jobs: | |
test: | |
name: Tests (FUSE ${{ matrix.fuseVersion }}) | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
fuseVersion: [2, 3] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install operating system dependencies | |
uses: ./.github/actions/install-dependencies | |
with: | |
fuseVersion: ${{ matrix.fuseVersion }} | |
- name: Set up Rust toolchain | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
# setup-rust-toolchain sets "-D warnings" by default, and Rust treats any warning as compile error. | |
# We need to this currently because `vendor/fuser` contains some warnings and it breaks the build. | |
rustflags: "" | |
- name: Cargo cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-${{ github.job }}-fuse${{ matrix.fuseVersion }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Build tests | |
run: cargo test --features $RUST_FEATURES --no-run | |
- name: Run tests | |
run: cargo test --features $RUST_FEATURES | |
macos-test: | |
name: Tests (MacOS) | |
runs-on: macos-12 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install dependencies | |
run: | | |
brew update > /dev/null && brew install pkg-config | |
- name: Install fuse | |
run: | | |
brew install --cask macfuse | |
- name: Set up Rust toolchain | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
# setup-rust-toolchain sets "-D warnings" by default, and Rust treats any warning as compile error. | |
# We need to this currently because `vendor/fuser` contains some warnings and it breaks the build. | |
rustflags: "" | |
- name: Cargo cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-${{ github.job }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Build tests | |
run: cargo test --no-run | |
- name: Run tests | |
run: cargo test -- --skip=mnt::test::mount_unmount | |
check: | |
name: Check all targets | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install operating system dependencies | |
uses: ./.github/actions/install-dependencies | |
with: | |
fuseVersion: 2 | |
- name: Set up Rust toolchain | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
# setup-rust-toolchain sets "-D warnings" by default, and Rust treats any warning as compile error. | |
# We need to this currently because `vendor/fuser` contains some warnings and it breaks the build. | |
rustflags: "" | |
- name: Cargo cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-${{ github.job }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Check all targets | |
run: cargo check --locked --all-targets --all-features | |
bench: | |
name: Cargo benchmarks | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install operating system dependencies | |
uses: ./.github/actions/install-dependencies | |
with: | |
fuseVersion: 2 | |
- name: Set up Rust toolchain | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
# setup-rust-toolchain sets "-D warnings" by default, and Rust treats any warning as compile error. | |
# We need to this currently because `vendor/fuser` contains some warnings and it breaks the build. | |
rustflags: "" | |
- name: Cargo cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-${{ github.job }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Run benchmarks | |
run: cargo bench | |
shuttle: | |
name: Shuttle tests | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Set up Rust toolchain | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
# setup-rust-toolchain sets "-D warnings" by default, and Rust treats any warning as compile error. | |
# We need to this currently because `vendor/fuser` contains some warnings and it breaks the build. | |
rustflags: "" | |
- name: Install operating system dependencies | |
uses: ./.github/actions/install-dependencies | |
with: | |
fuseVersion: 2 | |
- name: Cargo cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-${{ github.job }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Run Shuttle tests | |
run: cargo test -p mountpoint-s3 --features shuttle -- shuttle | |
rustfmt: | |
name: Formatting | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Rust toolchain | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
# setup-rust-toolchain sets "-D warnings" by default, and Rust treats any warning as compile error. | |
# We need to this currently because `vendor/fuser` contains some warnings and it breaks the build. | |
rustflags: "" | |
components: rustfmt | |
- name: Check format | |
run: make fmt-check | |
clippy: | |
name: Clippy | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install operating system dependencies | |
uses: ./.github/actions/install-dependencies | |
with: | |
fuseVersion: 2 | |
- name: Set up Rust toolchain | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
# setup-rust-toolchain sets "-D warnings" by default, and Rust treats any warning as compile error. | |
# We need to this currently because `vendor/fuser` contains some warnings and it breaks the build. | |
rustflags: "" | |
components: clippy | |
- name: Cargo cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-${{ github.job }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Run Clippy | |
run: make clippy | |
docs: | |
name: CRT docs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Set up Rust toolchain | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
# setup-rust-toolchain sets "-D warnings" by default, and Rust treats any warning as compile error. | |
# We need to this currently because `vendor/fuser` contains some warnings and it breaks the build. | |
rustflags: "" | |
components: rust-docs | |
- name: Cargo cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-${{ github.job }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Build CRT binding documentation | |
run: cargo doc --no-deps -p mountpoint-s3-crt | |
deny: | |
name: Licenses | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Rust toolchain | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
# setup-rust-toolchain sets "-D warnings" by default, and Rust treats any warning as compile error. | |
# We need to this currently because `vendor/fuser` contains some warnings and it breaks the build. | |
rustflags: "" | |
- name: Run cargo deny | |
uses: EmbarkStudios/cargo-deny-action@v1 |