Skip to content

Commit

Permalink
[Rust] Create Rust CI (#356)
Browse files Browse the repository at this point in the history
* create Rust CI

Signed-off-by: zenghua <[email protected]>

* add upsert_with_io_config_tests test cases

Signed-off-by: zenghua <[email protected]>

---------

Signed-off-by: zenghua <[email protected]>
Co-authored-by: zenghua <[email protected]>
  • Loading branch information
Ceng23333 and zenghua authored Oct 24, 2023
1 parent e2f5113 commit f82eb3c
Show file tree
Hide file tree
Showing 15 changed files with 659 additions and 29 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/rust-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# SPDX-FileCopyrightText: 2023 LakeSoul Contributors
#
# SPDX-License-Identifier: Apache-2.0

on:
push:
paths:
- "rust/**"
branches:
- 'main'
pull_request:
paths:
- "rust/**"
branches:
- 'main'
- 'release/**'
workflow_dispatch:

name: Rust CI

env:
RUSTFLAGS: "-Awarnings"

jobs:
rust_ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2023-05-20
components: clippy
default: true
- name: Install Protoc
uses: arduino/setup-protoc@v2
with:
version: "23.x"
- name: Run tests
run: cd rust && cargo test --all-features --package lakesoul-datafusion

6 changes: 3 additions & 3 deletions .github/workflows/rust-clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
on:
push:
paths:
- "native-io/**"
- "rust/**"
branches:
- 'main'
pull_request:
paths:
- "native-io/**"
- "rust/**"
branches:
- 'main'
- 'release/**'
workflow_dispatch:

name: Clippy check
name: Rust Clippy Check

# Make sure CI fails on all warnings, including Clippy lints
env:
Expand Down
11 changes: 11 additions & 0 deletions rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# SPDX-License-Identifier: Apache-2.0

[workspace]
members = ["lakesoul-metadata", "lakesoul-metadata-c", "proto", "lakesoul-io", "lakesoul-io-c"]
members = ["lakesoul-metadata", "lakesoul-metadata-c", "proto", "lakesoul-io", "lakesoul-io-c", "lakesoul-datafusion"]
resolver = "2"

[profile.release]
16 changes: 16 additions & 0 deletions rust/lakesoul-datafusion/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# SPDX-FileCopyrightText: 2023 LakeSoul Contributors
#
# SPDX-License-Identifier: Apache-2.0

[package]
name = "lakesoul-datafusion"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
lakesoul-io = { path = "../lakesoul-io" }
lakesoul-metadata = { path = "../lakesoul-metadata" }
proto = { path = "../proto" }
prost = "0.11"
6 changes: 6 additions & 0 deletions rust/lakesoul-datafusion/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// SPDX-FileCopyrightText: 2023 LakeSoul Contributors
//
// SPDX-License-Identifier: Apache-2.0

#[cfg(test)]
mod test;
5 changes: 5 additions & 0 deletions rust/lakesoul-datafusion/src/test/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// SPDX-FileCopyrightText: 2023 LakeSoul Contributors
//
// SPDX-License-Identifier: Apache-2.0

mod upsert_tests;
Loading

0 comments on commit f82eb3c

Please sign in to comment.