diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e20cff9435241efddbf1fc3fcd93fd837e19d8cf..501d5749c3b212bd0035a25e4024ccd00e240240 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,7 @@ include: - project: "picodata/devops/ci-templates" - file: "build_ci.yml" - ref: 0.1.0 + file: "all.yml" + ref: 0.1.1 stages: - test @@ -18,22 +18,8 @@ variables: default: image: $CI_IMAGE -.rust_cache: &rust_cache - - paths: - - $CI_PROJECT_DIR/.cargo/.crates.toml - - $CI_PROJECT_DIR/.cargo/.crates2.json - - $CI_PROJECT_DIR/.cargo/bin - - $CI_PROJECT_DIR/.cargo/registry/index - - $CI_PROJECT_DIR/.cargo/registry/cache - - $CI_PROJECT_DIR/.cargo/git/db - - $CI_PROJECT_DIR/.cache/sccache - - $CI_PROJECT_DIR/target/debug/libexample.so - key: - files: - - ./Cargo.lock - when: "always" - .base: + extends: .base_rust_cache variables: # variables for rust cache CARGO_HOME: $CI_PROJECT_DIR/.cargo @@ -46,8 +32,6 @@ default: - docker needs: [] interruptible: true - cache: - - *rust_cache int-test: stage: "test" diff --git a/Cargo.lock b/Cargo.lock index 81c3a1c71ba8c0aad2d4ee752a80eff0063f9778..ada395abb3767e1b0bd1fff83dad722fc9c2aca6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -98,6 +98,17 @@ dependencies = [ "syn 2.0.22", ] +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi 0.1.19", + "libc", + "winapi", +] + [[package]] name = "autocfg" version = "1.1.0" @@ -179,6 +190,23 @@ dependencies = [ "winapi", ] +[[package]] +name = "clap" +version = "3.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" +dependencies = [ + "atty", + "bitflags", + "clap_derive 3.2.25", + "clap_lex 0.2.4", + "indexmap 1.9.3", + "once_cell", + "strsim", + "termcolor", + "textwrap", +] + [[package]] name = "clap" version = "4.3.8" @@ -186,7 +214,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9394150f5b4273a1763355bd1c2ec54cc5a2593f790587bcd6b2c947cfa9211" dependencies = [ "clap_builder", - "clap_derive", + "clap_derive 4.3.2", "once_cell", ] @@ -199,10 +227,23 @@ dependencies = [ "anstream", "anstyle", "bitflags", - "clap_lex", + "clap_lex 0.5.0", "strsim", ] +[[package]] +name = "clap_derive" +version = "3.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae6371b8bdc8b7d3959e9cf7b22d4435ef3e79e138688421ec654acf8c81b008" +dependencies = [ + "heck", + "proc-macro-error", + "proc-macro2 1.0.63", + "quote 1.0.28", + "syn 1.0.109", +] + [[package]] name = "clap_derive" version = "4.3.2" @@ -215,6 +256,15 @@ dependencies = [ "syn 2.0.22", ] +[[package]] +name = "clap_lex" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" +dependencies = [ + "os_str_bytes", +] + [[package]] name = "clap_lex" version = "0.5.0" @@ -261,6 +311,16 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "crossbeam-queue" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" +dependencies = [ + "cfg-if 1.0.0", + "crossbeam-utils", +] + [[package]] name = "crossbeam-utils" version = "0.8.16" @@ -607,6 +667,15 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + [[package]] name = "hermit-abi" version = "0.3.1" @@ -684,7 +753,7 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi", + "hermit-abi 0.3.1", "libc", "windows-sys 0.48.0", ] @@ -695,7 +764,7 @@ version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" dependencies = [ - "hermit-abi", + "hermit-abi 0.3.1", "io-lifetimes", "rustix 0.37.20", "windows-sys 0.48.0", @@ -899,6 +968,12 @@ dependencies = [ "thiserror", ] +[[package]] +name = "os_str_bytes" +version = "6.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d5d9eb14b174ee9aa2ef96dc2b94637a2d4b6e7cb873c7e171f0c20c6cf3eac" + [[package]] name = "parking_lot" version = "0.12.1" @@ -1356,9 +1431,9 @@ dependencies = [ [[package]] name = "shors" -version = "0.4.2" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8586d32940ab0bf6c3ae8bd3d54c890687923b957b2fc0cbba9f6e9eeb3ba2b" +checksum = "f6c3d015fe48d075ff2696751b7a6932f3c313576d60ec6303e9a0756ce58657" dependencies = [ "chrono", "lazy_static", @@ -1439,14 +1514,16 @@ dependencies = [ [[package]] name = "tarantool" -version = "1.1.0" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1957ea0175d876d0052cf886a751fb96f276e7a1bf4553e42cfde29306ab55eb" +checksum = "f51760d514e39a42e217ad8eaba6bce8c9575c07ccb1dfbb86cd0451d4ee4acb" dependencies = [ "async-trait", "base64", "bitflags", "byteorder", + "clap 3.2.25", + "crossbeam-queue", "dec", "dlopen", "futures", @@ -1476,11 +1553,12 @@ dependencies = [ [[package]] name = "tarantool-proc" -version = "0.2.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d047ceac7bb814745ed7893d3b6855f4f12e74715ffa5faebc0cff9b6bbf511c" +checksum = "de423e6433ccffb7d47b480f2621b9c094091a7cacdb8dd876a2e013781314c3" dependencies = [ "darling", + "proc-macro-error", "proc-macro2 1.0.63", "quote 1.0.28", "syn 1.0.109", @@ -1493,16 +1571,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b87c5ea878cd7171b51866b299f49f702c6c3c9c0a979968024477001f6f819f" dependencies = [ "anyhow", - "clap", + "clap 4.3.8", "tempfile", ] [[package]] name = "tarantool-test" -version = "0.1.0" +version = "0.2.0" dependencies = [ "anyhow", - "clap", + "clap 4.3.8", "linkme 0.3.10", "serde", "serde_json", @@ -1536,6 +1614,15 @@ dependencies = [ "winapi", ] +[[package]] +name = "termcolor" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64" +dependencies = [ + "winapi-util", +] + [[package]] name = "tester" version = "0.7.0" @@ -1560,6 +1647,12 @@ dependencies = [ "tempfile", ] +[[package]] +name = "textwrap" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" + [[package]] name = "thiserror" version = "1.0.40" @@ -1609,9 +1702,9 @@ checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" [[package]] name = "tlua" -version = "1.0.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f74379fdcb4a174dec814a3071cec3d978f06af5e5681b1f0578475970cc4be5" +checksum = "1997a1f6440bb3eb0d1d1f08b32730bf111520007a3a59e7d34f8afcbc167dd5" dependencies = [ "libc", "serde", diff --git a/example/Cargo.toml b/example/Cargo.toml index 4192ec65c11f2374a7cf4c5cec5693eb20d2128a..cc02d625c0fd59339e2d27ade8014c5cd60a10a2 100644 --- a/example/Cargo.toml +++ b/example/Cargo.toml @@ -4,10 +4,10 @@ version = "0.1.0" edition = "2021" [dependencies] -tarantool = { version = "1.1.0", features = ["test"] } +tarantool = { version = "3.0.1", features = ["test"] } tarantool-test = { path = "../tarantool-test" } anyhow = "1" -shors = "0.4" +shors = "0.6" [lib] crate-type = ["lib", "cdylib"] diff --git a/tarantool-test/Cargo.toml b/tarantool-test/Cargo.toml index a80e3fd0de330c14b1821edb223b37267619530f..3d2cf5e6dc250ea20a8be9944a0c922b2b2354a9 100644 --- a/tarantool-test/Cargo.toml +++ b/tarantool-test/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tarantool-test" -version = "0.1.0" +version = "0.2.0" edition = "2021" description = "CLI test framework for tarantool-based Rust applications" readme = "README.md" @@ -10,27 +10,24 @@ license = "BSD-2-Clause" keywords = ["tarantool", "utility", "cli"] categories = ["command-line-utilities"] authors = ["Fedor Telnov"] -include = [ - "src/**/*", - "README.md" -] +include = ["src/**/*", "README.md"] [features] bin = ["dep:clap", "dep:tempfile", "dep:tarantool-runner"] [dependencies] linkme = "0.3" -tarantool = {version = "1.1.0", features = ["test"] } +tarantool = { version = "3.0.1", features = ["test"] } serde = "1.0" tester = "0.7" anyhow = "1" -serde_json = {version = "1"} +serde_json = { version = "1" } # Binary deps. -clap = {version = "4", features = ["derive"], optional = true} -tempfile = {version = "3", optional = true } +clap = { version = "4", features = ["derive"], optional = true } +tempfile = { version = "3", optional = true } tarantool-runner = { version = "0.1.0", optional = true } [[bin]] name = "tarantool-test" -required-features = ["bin"] \ No newline at end of file +required-features = ["bin"] diff --git a/tests/Cargo.toml b/tests/Cargo.toml index ec36d7578bcb746ddd1e46e8a3e43dea95e8d625..6e705b469bfba1c55e66d2b46a8a3c18a2a4c583 100644 --- a/tests/Cargo.toml +++ b/tests/Cargo.toml @@ -8,7 +8,7 @@ serde = "1.0" anyhow = "1" serde_json = "1" -example = {path = "../example"} -tarantool-test = {path = "../tarantool-test"} +example = { path = "../example" } +tarantool-test = { path = "../tarantool-test" } tarantool-runner = { version = "0.1.0" } -tempfile = "3.6" \ No newline at end of file +tempfile = "3.6"