Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add github actions #10

Merged
merged 3 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Rust

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-Dwarnings"

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: clippy
- uses: Swatinem/rust-cache@v2

- name: Build
run: cargo build --verbose
- name: Run Clippy
run: cargo clippy --all-targets --all-features
- name: Run tests
run: cargo test --verbose

rust_fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: rustfmt
- name: Run rust fmt
run: cargo fmt --all -- --check
3 changes: 2 additions & 1 deletion crates/core/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ impl Context {
pub async fn from_topic(&self, topic: TopicReader) -> Result<DataStream, DataFusionError> {
let topic_name = topic.0.topic.clone();

self.register_table(topic_name.clone(), Arc::new(topic)).await?;
self.register_table(topic_name.clone(), Arc::new(topic))
.await?;

let df = self
.session_conext
Expand Down
3 changes: 2 additions & 1 deletion crates/core/src/datastream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ impl DataStream {
.await?;

self.context
.register_table(topic.clone(), Arc::new(sink_topic)).await?;
.register_table(topic.clone(), Arc::new(sink_topic))
.await?;

self.df
.as_ref()
Expand Down