Skip to content

Commit

Permalink
Merge pull request #10 from probably-nothing-labs/add-actions
Browse files Browse the repository at this point in the history
Add github actions
  • Loading branch information
emgeee authored Aug 2, 2024
2 parents 06cb3e9 + 032a4b6 commit 92b0920
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 2 deletions.
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

0 comments on commit 92b0920

Please sign in to comment.