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

Added CI #14

Merged
merged 6 commits into from
Feb 26, 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
18 changes: 18 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: 2
updates:
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "daily"
rebase-strategy: "disabled"
commit-message:
prefix: "chore(deps,cargo)"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
commit-message:
prefix: "chore(deps,github-actions)"
ignore:
- dependency-name: "dtolnay/rust-toolchain"
13 changes: 13 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Check

on: [push, pull_request]

jobs:
formatting:
name: Formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- run: npm install prettier prettier-plugin-toml
- run: npx prettier --check --no-config .
46 changes: 46 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Docs

on: [push, pull_request]

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: ${{ github.ref }}

jobs:
rustdoc:
name: Rustdoc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- uses: dtolnay/rust-toolchain@nightly
- uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: cargo rustdoc -p datafusion-federation -- --cfg docsrs
- run: chmod -c -R +rX "target/doc"
- run: touch target/doc/index.html
- run: echo "<meta http-equiv=refresh content=0;url=datafusion_federation>" > target/doc/index.html
- if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v3
with:
path: target/doc

deploy:
name: Deploy
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: rustdoc
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/configure-pages@v4
- uses: actions/deploy-pages@v4
id: deployment
30 changes: 30 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Pull Request

on:
pull_request_target:
types:
- opened
- reopened
- edited
- synchronize

jobs:
conventional-commits:
name: Conventional Commits
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- run: npm install @commitlint/config-conventional
- run: npx commitlint <<< $CONVENTIONAL_COMMIT
env:
CONVENTIONAL_COMMIT: |
${{ github.event.pull_request.title }}

${{ github.event.pull_request.body }}
- if: failure()
run:
echo "Datafusion-federation follows the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) for release automation.
The PR title and body are used as the merge commit message.

Please update your PR title to match the specification." >> $GITHUB_STEP_SUMMARY
39 changes: 39 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Release

on:
push:
branches:
- main

jobs:
release:
name: Release
runs-on: ubuntu-latest
concurrency: release
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- uses: dtolnay/rust-toolchain@stable
- run: cargo install cargo-smart-release --debug --locked
- uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: cargo check
- run: cargo changelog --execute datafusion-federation
- run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- env:
GH_TOKEN: ${{ github.token }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
run: |
cargo smart-release \
--update-crates-index \
--allow-fully-generated-changelogs \
--execute \
--no-changelog-preview \
--allow-dirty \
--verbose \
datafusion-federation
73 changes: 73 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Test

on: [push, pull_request]

jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- uses: dtolnay/rust-toolchain@stable
- uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: cargo check

test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- uses: dtolnay/rust-toolchain@stable
- uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: cargo test

rustfmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- run: cargo fmt -- --check

clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: cargo clippy -- -Dwarnings

package:
name: Package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- uses: dtolnay/rust-toolchain@stable
- uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: cargo build
- run: cargo package -p datafusion-federation --allow-dirty
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## DataFusion Federation

[![crates.io](https://img.shields.io/crates/v/datafusion-federation.svg)](https://crates.io/crates/datafusion-federation)
[![docs.rs](https://docs.rs/datafusion-federation/badge.svg)](https://docs.rs/datafusion-federation)

The goal of this repo is to allow [DataFusion](https://github.com/apache/arrow-datafusion) to resolve queries across remote query engines while pushing down as much compute as possible down.

Check out [the examples](./examples/) to get a feel for how it works.
Expand All @@ -14,3 +17,6 @@ Potential use-cases:
#### Status

The project is in alpha status. Contributions welcome; land a PR = commit access.

- [Docs (release)](https://docs.rs/datafusion-federation)
- [Docs (main)](https://datafusion-contrib.github.io/datafusion-federation/)
12 changes: 12 additions & 0 deletions datafusion-federation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ version.workspace = true
edition.workspace = true
license.workspace = true
readme.workspace = true
description = "Datafusion federation."

[lib]
name = "datafusion_federation"
Expand All @@ -12,3 +13,14 @@ path = "src/lib.rs"
[dependencies]
async-trait.workspace = true
datafusion.workspace = true

[package.metadata.docs.rs]

# Features to pass to Cargo (default: [])
features = []

# Whether to pass `--all-features` to Cargo (default: false)
all-features = true

# Whether to pass `--no-default-features` to Cargo (default: false)
no-default-features = true