From 52a0a6e59fde7b87cd59a49c8d0882ddb9c05327 Mon Sep 17 00:00:00 2001 From: Joel Wachsler Date: Sun, 10 Jul 2022 15:27:31 +0000 Subject: [PATCH] Convert to workspace --- .../qbittorrent-web-api.code-workspace | 17 ----- .github/workflows/ci.yml | 10 +++ Cargo.lock | 65 +++++++++++++++++++ Cargo.toml | 7 ++ 4 files changed, 82 insertions(+), 17 deletions(-) delete mode 100644 .devcontainer/qbittorrent-web-api.code-workspace diff --git a/.devcontainer/qbittorrent-web-api.code-workspace b/.devcontainer/qbittorrent-web-api.code-workspace deleted file mode 100644 index ce11255..0000000 --- a/.devcontainer/qbittorrent-web-api.code-workspace +++ /dev/null @@ -1,17 +0,0 @@ -{ - "folders": [ - { - "path": ".." - }, - { - "path": "../parser" - }, - { - "path": "../md-parser" - }, - { - "path": "../api-gen" - }, - ], - "settings": {} -} \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9a6dded..65b1359 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,4 +16,14 @@ jobs: uses: actions-rs/cargo@v1 with: command: check + + - name: Run cargo clippy + uses: actions-rs/cargo@v1 + with: + command: clippy + + - name: Run tests + uses: actions-rs/cargo@v1 + with: + command: tests --workspace \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index b2ff261..4cd36a2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -11,19 +11,29 @@ dependencies = [ "memchr", ] +[[package]] +name = "anyhow" +version = "1.0.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb07d2053ccdbe10e2af2995a2f116c1330396493dc1269f6a91d0ae82e19704" + [[package]] name = "api-gen" version = "0.1.0" dependencies = [ + "anyhow", "case", "parser", "proc-macro2", "quote", "regex", + "reqwest", "serde", "serde_json", "syn", "thiserror", + "tokio", + "trybuild", ] [[package]] @@ -90,6 +100,12 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" +[[package]] +name = "dissimilar" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c97b9233581d84b8e1e689cdd3a47b6f69770084fc246e86a7f78b0d9c1d4a5" + [[package]] name = "encoding_rs" version = "0.8.31" @@ -178,6 +194,12 @@ dependencies = [ "pin-utils", ] +[[package]] +name = "glob" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" + [[package]] name = "h2" version = "0.3.13" @@ -791,6 +813,15 @@ dependencies = [ "winapi", ] +[[package]] +name = "termcolor" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" +dependencies = [ + "winapi-util", +] + [[package]] name = "thiserror" version = "1.0.31" @@ -881,6 +912,15 @@ dependencies = [ "tracing", ] +[[package]] +name = "toml" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" +dependencies = [ + "serde", +] + [[package]] name = "tower-service" version = "0.3.2" @@ -913,6 +953,22 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" +[[package]] +name = "trybuild" +version = "1.0.63" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "764b9e244b482a9b81bde596aa37aa6f1347bf8007adab25e59f901b32b4e0a0" +dependencies = [ + "dissimilar", + "glob", + "once_cell", + "serde", + "serde_derive", + "serde_json", + "termcolor", + "toml", +] + [[package]] name = "unicase" version = "2.6.0" @@ -1075,6 +1131,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +[[package]] +name = "winapi-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" diff --git a/Cargo.toml b/Cargo.toml index 5c3fc2e..ea49ab7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,3 +14,10 @@ api-gen = { path = "./api-gen" } serde = { version = "1.0.138", features = ["derive"] } serde_json = "1.0.82" thiserror = "1.0.31" + +[workspace] +members = [ + "api-gen", + "parser", + "md-parser", +]