Skip to content

Commit

Permalink
add testcase for work with minio (#9)
Browse files Browse the repository at this point in the history
* add testcase for work with minio

* debug github action
  • Loading branch information
jiangzhx authored Aug 2, 2023
1 parent 4e14463 commit 984a8cc
Show file tree
Hide file tree
Showing 9 changed files with 1,760 additions and 105 deletions.
57 changes: 0 additions & 57 deletions .github/actions/setup-builder/action.yaml

This file was deleted.

55 changes: 18 additions & 37 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,18 @@ jobs:
linux-build-lib:
name: cargo check
runs-on: ubuntu-latest
container:
image: amd64/rust
steps:
- uses: actions/checkout@v3
- name: Cache Cargo
uses: actions/cache@v3
with:
# these represent dependencies downloaded by cargo
# and thus do not depend on the OS, arch nor rust version.
path: /github/home/.cargo
path: /home/runner/.cargo
key: cargo-cache-
- name: Setup Rust toolchain
uses: ./.github/actions/setup-builder
- uses: actions-rs/toolchain@v1
with:
rust-version: stable
toolchain: stable
- name: Check workspace in debug mode
run: cargo check

Expand All @@ -49,22 +46,19 @@ jobs:
name: cargo test (amd64)
needs: [ linux-build-lib ]
runs-on: ubuntu-latest
container:
image: amd64/rust
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Cache Cargo
uses: actions/cache@v3
with:
path: /github/home/.cargo
path: /home/runner/.cargo
# this key equals the ones on `linux-build-lib` for re-use
key: cargo-cache-
- name: Setup Rust toolchain
uses: ./.github/actions/setup-builder
- uses: actions-rs/toolchain@v1
with:
rust-version: stable
toolchain: stable
- name: Run tests (excluding doctests)
run: cargo test --lib --tests --bins
- name: Verify Working Directory Clean
Expand All @@ -74,16 +68,13 @@ jobs:
name: cargo examples (amd64)
needs: [ linux-build-lib ]
runs-on: ubuntu-latest
container:
image: amd64/rust
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup Rust toolchain
uses: ./.github/actions/setup-builder
- uses: actions-rs/toolchain@v1
with:
rust-version: stable
toolchain: stable
- name: Run examples
run: |
cargo run --example retention
Expand All @@ -93,40 +84,33 @@ jobs:
check-fmt:
name: Check cargo fmt
runs-on: ubuntu-latest
container:
image: amd64/rust
steps:
- uses: actions/checkout@v3
- name: Setup Rust toolchain
uses: ./.github/actions/setup-builder
- uses: actions-rs/toolchain@v1
with:
rust-version: stable
toolchain: stable
- uses: actions/checkout@v3
- name: Run
run: ci/scripts/rust_fmt.sh

cargo-toml-formatting-checks:
name: check Cargo.toml formatting
needs: [ linux-build-lib ]
runs-on: ubuntu-latest
container:
image: amd64/rust
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Cache Cargo
uses: actions/cache@v3
with:
path: /github/home/.cargo
path: /home/runner/.cargo
# this key equals the ones on `linux-build-lib` for re-use
key: cargo-cache-
- name: Setup Rust toolchain
uses: ./.github/actions/setup-builder
- uses: actions-rs/toolchain@v1
with:
rust-version: stable
toolchain: stable
- 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
Expand All @@ -135,27 +119,24 @@ jobs:
# 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
needs: [ linux-build-lib ]
runs-on: ubuntu-latest
container:
image: amd64/rust
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Cache Cargo
uses: actions/cache@v3
with:
path: /github/home/.cargo
path: /home/runner/.cargo
# this key equals the ones on `linux-build-lib` for re-use
key: cargo-cache-
- name: Setup Rust toolchain
uses: ./.github/actions/setup-builder
- uses: actions-rs/toolchain@v1
with:
rust-version: stable
toolchain: stable
- name: Install Clippy
run: rustup component add clippy
- name: Run clippy
Expand Down
Loading

0 comments on commit 984a8cc

Please sign in to comment.