ci: add toml format linter (#706)

* chore: run taplo format

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* ci: add workflow to check toml

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* rerun formatter with ident to 4 spaces

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* update check command

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
This commit is contained in:
Ruihang Xia
2022-12-05 20:03:10 +08:00
committed by GitHub
parent beb07fc895
commit 6fb413ae50
6 changed files with 37 additions and 19 deletions

View File

@@ -49,6 +49,23 @@ jobs:
- name: Run cargo check
run: cargo check --workspace --all-targets
toml:
name: Toml Check
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Install taplo
run: cargo install taplo-cli --version ^0.8 --locked
- name: Run taplo
run: taplo format --check --option "indent_string= "
# Use coverage to run test.
# test:
# name: Test Suite

View File

@@ -35,9 +35,9 @@ members = [
"src/storage",
"src/store-api",
"src/table",
"tests-integration"
,
"tests/runner"]
"tests-integration",
"tests/runner",
]
[profile.release]
debug = true

View File

@@ -11,4 +11,3 @@ common-error = { path = "../error" }
paste = "1.0"
serde = { version = "1.0", features = ["derive"] }
snafu = { version = "0.7", features = ["backtraces"] }

View File

@@ -26,7 +26,7 @@ common-runtime = { path = "../common/runtime" }
common-telemetry = { path = "../common/telemetry" }
common-time = { path = "../common/time" }
datafusion = { git = "https://github.com/apache/arrow-datafusion.git", branch = "arrow2", features = [
"simd",
"simd",
] }
datatypes = { path = "../datatypes" }
frontend = { path = "../frontend" }
@@ -61,7 +61,7 @@ axum-test-helper = { git = "https://github.com/sunng87/axum-test-helper.git", br
client = { path = "../client" }
common-query = { path = "../common/query" }
datafusion = { git = "https://github.com/apache/arrow-datafusion.git", branch = "arrow2", features = [
"simd",
"simd",
] }
datafusion-common = { git = "https://github.com/apache/arrow-datafusion.git", branch = "arrow2" }
tempdir = "0.3"

View File

@@ -7,16 +7,16 @@ license = "Apache-2.0"
[features]
default = ["python"]
python = [
"dep:datafusion",
"dep:datafusion-expr",
"dep:datafusion-physical-expr",
"dep:rustpython-vm",
"dep:rustpython-parser",
"dep:rustpython-compiler",
"dep:rustpython-compiler-core",
"dep:rustpython-bytecode",
"dep:rustpython-ast",
"dep:paste",
"dep:datafusion",
"dep:datafusion-expr",
"dep:datafusion-physical-expr",
"dep:rustpython-vm",
"dep:rustpython-parser",
"dep:rustpython-compiler",
"dep:rustpython-compiler-core",
"dep:rustpython-bytecode",
"dep:rustpython-ast",
"dep:paste",
]
[dependencies]
@@ -45,8 +45,8 @@ rustpython-compiler = { git = "https://github.com/RustPython/RustPython", option
rustpython-compiler-core = { git = "https://github.com/RustPython/RustPython", optional = true, rev = "02a1d1d" }
rustpython-parser = { git = "https://github.com/RustPython/RustPython", optional = true, rev = "02a1d1d" }
rustpython-vm = { git = "https://github.com/RustPython/RustPython", optional = true, rev = "02a1d1d", features = [
"default",
"freeze-stdlib",
"default",
"freeze-stdlib",
] }
session = { path = "../session" }
snafu = { version = "0.7", features = ["backtraces"] }

View File

@@ -56,7 +56,9 @@ tower-http = { version = "0.3", features = ["full"] }
axum-test-helper = { git = "https://github.com/sunng87/axum-test-helper.git", branch = "patch-1" }
catalog = { path = "../catalog" }
common-base = { path = "../common/base" }
mysql_async = { version = "0.31", default-features = false, features = ["default-rustls"] }
mysql_async = { version = "0.31", default-features = false, features = [
"default-rustls",
] }
query = { path = "../query" }
rand = "0.8"
script = { path = "../script", features = ["python"] }