Skip to content

chore(deps): update rocksdb requirement from 0.23 to 0.24 #2161

chore(deps): update rocksdb requirement from 0.23 to 0.24

chore(deps): update rocksdb requirement from 0.23 to 0.24 #2161

Workflow file for this run

name: CI
on:
push:
pull_request:
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
CARGO_REGISTRIES_MY_REGISTRY_INDEX: https://github.com/rust-lang/crates.io-index
jobs:
# 1
check:
name: Rust project check
permissions:
id-token: write
contents: read
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- uses: actions/checkout@v4
- name: Install latest
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy
- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
key: ${{ runner.os }}-${{ runner.arch }}-cargo-${{ hashFiles('**/Cargo.toml') }}
cache-on-failure: false
# `cargo clippy` command here will use installed `stable`
# as it is set as an "override" for current directory
- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --workspace -- -D warnings
- name: Run cargo build
uses: actions-rs/cargo@v1
with:
command: build
- name: configure aws credentials
if: ${{ (github.event_name == 'push' && github.ref_name == 'main') || startsWith(github.ref, 'refs/tags/') }}
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.ROLE_TO_ASSUME }}
role-session-name: samplerolesession
aws-region: ${{ env.AWS_REGION }}
env:
AWS_REGION: ap-southeast-1
ROLE_TO_ASSUME: arn:aws:iam::232814779190:role/github
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace
env:
BUCKET_NAME: tonbo-test
# 2
fmt:
name: Rust fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: rustfmt, clippy
# `cargo check` command here will use installed `nightly`
# as it is set as an "override" for current directory
- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
exmaples:
name: Rust exmaples
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Rust example cache
uses: Swatinem/rust-cache@v2
# - name: Run datafusion example
# uses: actions-rs/cargo@v1
# with:
# command: run
# args: --example datafusion --features=datafusion
- name: Run declare example
uses: actions-rs/cargo@v1
with:
command: run
args: --example declare --features bytes,tokio
# benchmark:
# name: Rust benchmark
# runs-on: self-hosted
# permissions:
# contents: write
# pull-requests: write
# repository-projects: write
# if: github.event_name == 'pull_request'
# steps:
# - uses: actions/checkout@v4
# - name: Install latest nightly
# uses: actions-rs/toolchain@v1
# with:
# toolchain: stable
# override: true
# # `cargo check` command here will use installed `nightly`
# # as it is set as an "override" for current directory
# - name: Run cargo bench
# uses: actions-rs/cargo@v1
# with:
# command: bench
# args: --features bench
# - name: Comment on PR using GitHub CLI
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# gh pr comment ${{ github.event.pull_request.number }} --body-file "read_benchmark.md"
# gh pr comment ${{ github.event.pull_request.number }} --body-file "write_benchmark.md"
coverage:
name: Code coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update stable
- name: Rust coverage cache
uses: Swatinem/rust-cache@v2
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Generate code coverage
run: cargo llvm-cov --workspace --lcov --output-path lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
fail_ci_if_error: true