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

Setup GitHub actions and Dependabot #5

Merged
merged 1 commit into from
Sep 28, 2022
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
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2
updates:
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "daily"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"

- package-ecosystem: "gitsubmodule"
directory: "/"
schedule:
interval: "daily"
14 changes: 14 additions & 0 deletions .github/workflows/cron.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Cron

on:
schedule:
- cron: "0 0 * * *"

jobs:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
47 changes: 47 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Docs

on: [push, pull_request]

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

concurrency:
group: pages
cancel-in-progress: true

jobs:
rustdoc:
name: Rustdoc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions-rs/toolchain@v1.0.7
with:
profile: minimal
toolchain: stable
- uses: arduino/setup-protoc@v1
- uses: actions-rs/cargo@v1.0.3
with:
command: doc
args: --no-deps
- if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v1
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@v2
- uses: actions/deploy-pages@v1
id: deployment
69 changes: 69 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Test

on: [push, pull_request]

jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions-rs/toolchain@v1.0.7
with:
profile: minimal
toolchain: stable
- uses: arduino/setup-protoc@v1
- uses: actions-rs/cargo@v1.0.3
with:
command: check

test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions-rs/toolchain@v1.0.7
with:
profile: minimal
toolchain: stable
- uses: arduino/setup-protoc@v1
- uses: actions-rs/cargo@v1.0.3
with:
command: test

rustfmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1.0.7
with:
profile: minimal
toolchain: stable
components: rustfmt
- uses: actions-rs/cargo@v1.0.3
with:
command: fmt
args: --all -- --check

clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions-rs/toolchain@v1.0.7
with:
profile: minimal
toolchain: stable
components: clippy
- uses: arduino/setup-protoc@v1
- uses: actions-rs/cargo@v1.0.3
with:
command: clippy
args: -- -Dwarnings
54 changes: 14 additions & 40 deletions Cargo.lock

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

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ keywords = [ "substrait" ]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
prost = "0.9"
prost-types = "0.9"
prost = "0.11"
prost-types = "0.11"

[build-dependencies]
glob = "0.3"
prost-build = { version = "0.9" }
prost-build = "0.11"
8 changes: 5 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
// SPDX-License-Identifier: Apache-2.0

// include the generated protobuf source as a submodule
/// Generated types for the protobuf `substrait` package
#[allow(clippy::all)]
pub mod protobuf {

/// Generated types for the protobuf `substrait.extensions` package
pub mod extensions {
include!(concat!(env!("OUT_DIR"), "/substrait.extensions.rs"));
}

include!(concat!(env!("OUT_DIR"), "/substrait.rs"));
}

#[cfg(test)]
mod tests {
use crate::protobuf::expression::literal::LiteralType;
use crate::protobuf::expression::Literal;
use crate::protobuf::expression::{literal::LiteralType, Literal};

#[test]
fn literal() {
Expand Down