Skip to content

add testcase for work with minio #62

add testcase for work with minio

add testcase for work with minio #62

Workflow file for this run

name: Rust
concurrency:
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
cancel-in-progress: true
on:
push:
paths-ignore:
- "docs/**"
- "**.md"
- ".github/ISSUE_TEMPLATE/**"
- ".github/pull_request_template.md"
pull_request:
paths-ignore:
- "docs/**"
- "**.md"
- ".github/ISSUE_TEMPLATE/**"
- ".github/pull_request_template.md"
# manual trigger
# https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
workflow_dispatch:
jobs:
# test the crate
linux-test:
name: cargo test (amd64)
runs-on: ubuntu-latest
# container:
# image: amd64/rust
steps:
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions/checkout@v3
with:
submodules: true
- name: Cache Cargo
uses: actions/cache@v3
with:
path: /github/home/.cargo
# this key equals the ones on `linux-build-lib` for re-use
key: cargo-cache-
- name: Run tests (excluding doctests)
run: cargo test --lib --tests --bins
- name: Verify Working Directory Clean
run: git diff --exit-code
linux-test-example:
name: cargo examples (amd64)
runs-on: ubuntu-latest
# container:
# image: amd64/rust
steps:
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions/checkout@v3
with:
submodules: true
- name: Run examples
run: |
cargo run --example retention
- name: Verify Working Directory Clean
run: git diff --exit-code
check-fmt:
name: Check cargo fmt
runs-on: ubuntu-latest
# container:
# image: amd64/rust
steps:
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions/checkout@v3
- name: Run
run: ci/scripts/rust_fmt.sh
cargo-toml-formatting-checks:
name: check Cargo.toml formatting
runs-on: ubuntu-latest
# container:
# image: amd64/rust
steps:
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions/checkout@v3
with:
submodules: true
- name: Cache Cargo
uses: actions/cache@v3
with:
path: /github/home/.cargo
# this key equals the ones on `linux-build-lib` for re-use
key: cargo-cache-
- name: Install cargo-tomlfmt
run: which cargo-tomlfmt || cargo install cargo-tomlfmt
- name: Check Cargo.toml formatting
run: |
# if you encounter error, try rerun the command below, finally run 'git diff' to
# check which Cargo.toml introduces formatting violation
#
# ignore ./Cargo.toml because putting workspaces in multi-line lists make it easy to read
ci/scripts/rust_toml_fmt.sh
git diff --exit-code
clippy:
name: clippy
runs-on: ubuntu-latest
# container:
# image: amd64/rust
steps:
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions/checkout@v3
with:
submodules: true
- name: Cache Cargo
uses: actions/cache@v3
with:
path: /github/home/.cargo
# this key equals the ones on `linux-build-lib` for re-use
key: cargo-cache-
- name: Install Clippy
run: rustup component add clippy
- name: Run clippy
run: ci/scripts/rust_clippy.sh