Skip to content

Commit

Permalink
Setup GitHub actions and Dependabot (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrobbel authored Sep 28, 2022
1 parent d8c6183 commit 7418a17
Show file tree
Hide file tree
Showing 7 changed files with 168 additions and 46 deletions.
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

0 comments on commit 7418a17

Please sign in to comment.