Skip to content

Implement Mongo storage (#1261) #40

Implement Mongo storage (#1261)

Implement Mongo storage (#1261) #40

Workflow file for this run

name: Rust
on:
push:
branches: [main, release-*]
paths-ignore:
- "docs/**"
pull_request:
branches: [main, release-*]
paths-ignore:
- "docs/**"
env:
CARGO_TERM_COLOR: always
jobs:
clippy_workspace:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Read rust-toolchain file
id: rust-toolchain
run: echo "toolchain=$(cat rust-toolchain)" >> $GITHUB_OUTPUT
- name: Add clippy
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ steps.rust-toolchain.outputs.toolchain }}
components: clippy
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --all-targets -- -D warnings
rust_fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Read rust-toolchain file
id: rust-toolchain
run: echo "toolchain=$(cat rust-toolchain)" >> $GITHUB_OUTPUT
- name: Add rustfmt
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ steps.rust-toolchain.outputs.toolchain }}
components: rustfmt
- uses: Swatinem/rust-cache@v2
- run: |
cargo fmt -- --check
rust_build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- run: cargo build --all-features --verbose
run_tests:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: MongoDB in GitHub Actions
uses: supercharge/mongodb-github-action@v1.10.0
- name: Redis in GitHub Actions
uses: supercharge/redis-github-action@1.7.0
with:
redis-version: 6
- run: |
cargo test --all-features --lib --bins --tests --examples --verbose -- --skip sled_transaction_timeout
cargo test sled_transaction_timeout --verbose -- --test-threads=1
cargo test --benches
run_examples:
name: Run examples
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- run: |
cargo run --package gluesql --example hello_world
cargo run --package gluesql --example api_usage
cargo run --package gluesql --example memory_storage_usage
cargo run --package gluesql --example sled_multi_threaded
cargo run --package gluesql --example using_config
cargo run --package gluesql --example hello_ast_builder