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

refactor: rename directory to adopt cargo workspace #42

Merged
merged 3 commits into from
Mar 7, 2023
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
7 changes: 4 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ name: Release

on:
push:
# Pattern matched against refs/tags
tags:
- '*' # Push events to every tag not containing /
- 'v*' # Push events to every tag not containing /
workflow_dispatch:

jobs:
Expand All @@ -22,6 +21,8 @@ jobs:
toolchain: stable
override: true

- run: cargo publish
- name: Publish sqlness
run: cargo publish
working-directory: sqlness
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
27 changes: 7 additions & 20 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,27 +1,14 @@
[package]
name = "sqlness"
version = "0.4.0"
[workspace]
members = ["sqlness", "sqlness-cli"]

[workspace.package]
version = "0.4.1"
edition = "2021"
authors = [
"CeresDB Authors <ceresdbservice@gmail.com>",
"Ruihang Xia <waynestxia@gmail.com>",
]
repository = "https://github.com/CeresDB/sqlness"
homepage = "https://github.com/CeresDB/sqlness"
license = "Apache-2.0"
description = "SQL integration test harness"

[dependencies]
async-trait = "0.1"
derive_builder = "0.11"
mysql = { version = "23.0.1", optional = true }
prettydiff = "0.6.2"
serde = { version = "1.0", features = ["derive"] }
thiserror = "1.0"
toml = "0.5"
walkdir = "2.3"

[dev-dependencies]
tokio = { version = "1.23", features = ["full"] }

[features]
default = []
keywords = ["sql", "database", "cli"]
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ clippy:
cd $(DIR); cargo clippy --all-targets --all-features --workspace -- -D warnings

basic-example:
cd $(DIR); cargo run --example basic
cd $(DIR)/sqlness; cargo run --example basic

bad-example:
cd $(DIR); cargo run --example bad
cd $(DIR)/sqlness; cargo run --example bad

cli-test:
cd $(DIR)/cli; cargo run -- -c tests -i 127.0.0.1 -p 3306 -u root -P 1a2b3c -d public
cd $(DIR)/sqlness-cli; cargo run -- -c tests -i 127.0.0.1 -p 3306 -u root -P 1a2b3c -d public
12 changes: 0 additions & 12 deletions cli/Cargo.toml

This file was deleted.

15 changes: 15 additions & 0 deletions sqlness-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[package]
name = "sqlness-cli"
version = { workspace = true }
edition = { workspace = true }
homepage = { workspace = true }
keywords = { workspace = true }
license = { workspace = true }
repository = { workspace = true }
description = "Sqlness command line tool"

[dependencies]
async-trait = "0.1.64"
clap = { version = "4.1.8", features = [ "derive" ] }
futures = "0.3.26"
sqlness = { path = "../sqlness", features = [ "mysql" ] }
File renamed without changes.
File renamed without changes.
File renamed without changes.
25 changes: 25 additions & 0 deletions sqlness/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[package]
name = "sqlness"
description = "SQL integration test harness"
version = { workspace = true }
edition = { workspace = true }
homepage = { workspace = true }
keywords = { workspace = true }
license = { workspace = true }
repository = { workspace = true }

[dependencies]
async-trait = "0.1"
derive_builder = "0.11"
mysql = { version = "23.0.1", optional = true }
prettydiff = "0.6.2"
serde = { version = "1.0", features = ["derive"] }
thiserror = "1.0"
toml = "0.5"
walkdir = "2.3"

[dev-dependencies]
tokio = { version = "1.23", features = ["full"] }

[features]
default = []
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.