Skip to content

chore: add rule and test #2033

chore: add rule and test

chore: add rule and test #2033

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
merge_group:
env:
CARGO_TERM_COLOR: always
CACHE_KEY_SUFFIX: v20220409
PROTOC_NO_VENDOR: 1
jobs:
fmt:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: arduino/setup-protoc@v1
with:
version: "3.x"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions-rs/toolchain@v1
with:
profile: minimal
components: rustfmt, clippy
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-${{ env.CACHE_KEY_SUFFIX }}
- name: Check code format
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: arduino/setup-protoc@v1
with:
version: "3.x"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions-rs/toolchain@v1
with:
profile: minimal
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-${{ env.CACHE_KEY_SUFFIX }}
- uses: taiki-e/install-action@nextest
- name: Test
run: cargo nextest run --workspace --no-fail-fast --all-features --locked
- name: Doctest
run: cargo test --doc --workspace --no-fail-fast --all-features --locked
tpch-test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: arduino/setup-protoc@v1
with:
version: "3.x"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions-rs/toolchain@v1
with:
profile: minimal
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-${{ env.CACHE_KEY_SUFFIX }}
- name: Generate TPC-H 1GB dataset
run: |
rm -rf risinglight.db
make tpch
- name: Build RisingLight (in release mode)
run: |
cargo build --release
- name: Run TPC-H Test
run: |
./target/release/risinglight -f tests/sql/tpch/create.sql
./target/release/risinglight -f tests/sql/tpch/import.sql
./target/release/risinglight -f tests/sql/tpch-full/_tpch_full.slt