diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..d875b27 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,25 @@ +name: Cargo Build & Test + +on: + push: + pull_request: + +env: + CARGO_TERM_COLOR: always + +jobs: + build_and_test: + name: Rust project - latest + runs-on: ubuntu-latest + strategy: + matrix: + toolchain: + - stable + - beta + - nightly + steps: + - uses: actions/checkout@v4 + - run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} + - run: cargo build --verbose + - run: cargo test --verbose + \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index 3508d7f..daa5cde 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,33 +20,27 @@ exclude = ["sandbox"] [dependencies] -assert_cmd = "2.0.12" +assert_cmd = "2.0.16" bcrypt = "0.15.1" -chrono = "0.4.26" -clap = {version = "4.3.23", features = ["derive"] } -console = "0.15.7" +chrono = "0.4.38" +clap = {version = "4.5.16", features = ["derive"] } +console = "0.15.8" dialoguer = {version = "0.10.4", features = ["fuzzy-select", "completion"] } dirs = "5.0.1" -include_dir = "0.7.3" -indicatif = "0.17.6" -lazy_static = "1.4.0" -serde = { version = "1.0.185", features = ["derive"] } -serde_json = "1.0.105" -tokio = {version = "1.20.0", features = ["macros", "rt-multi-thread"] } -uuid = {version = "1.4.1", features = ["v4", "fast-rng", "macro-diagnostics"] } +include_dir = "0.7.4" +indicatif = "0.17.8" +lazy_static = "1.5.0" +serde = { version = "1.0.209", features = ["derive"] } +serde_json = "1.0.127" +tokio = {version = "1.39.3", features = ["macros", "rt-multi-thread"] } +uuid = {version = "1.10.0", features = ["v4", "fast-rng", "macro-diagnostics"] } sea-orm = { version = "0.12", features = [ "sqlx-sqlite", "runtime-tokio-native-tls", "macros" , "with-uuid", "with-time"] } -anyhow = "1.0.81" +anyhow = "1.0.86" utils-cli-entity = { path = "entity", version = "1.0.5"} -utils-cli-migration = { path = "migration", version = "1.0.0"} # depends on your needs +utils-cli-migration = { path = "migration", version = "1.0.0"} online = "4.0.2" -configparser = "3.0.4" -reqwest = "0.12.2" -tonic = "0.11.0" -prost = "0.12.3" -regex = "1.10.4" +configparser = "3.1.0" +regex = "1.10.6" confy = "0.6.1" -[build-dependencies] -tonic-build = "0.11.0" - diff --git a/justfile b/justfile deleted file mode 100644 index 0eea435..0000000 --- a/justfile +++ /dev/null @@ -1,42 +0,0 @@ -@_list: - just --list --unsorted - - -alias r := run - -bt := '0' - -log := "warn" - -export JUST_LOG := log - -watch: - cargo watch -c -- just verify - -run: - trunk serve - -test: - cargo test --target wasm32-unknown-unknown - -# Perform all verifications (compile, test, lint etc.) -verify: test lint - -# Run the static code analysis -lint: - cargo fmt --check - -clean: - rm -rf target - rm -f Cargo.lock - rm -rf node_modules - - -fmt: - cargo fmt - - -install-tailwindcss: - curl -sLO https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-linux-x64 - chmod +x tailwindcss-linux-x64 - mv tailwindcss-linux-x64 /usr/bin/tailwindcss \ No newline at end of file diff --git a/migration/Cargo.toml b/migration/Cargo.toml index 1b66929..9accf13 100644 --- a/migration/Cargo.toml +++ b/migration/Cargo.toml @@ -14,7 +14,7 @@ path = "src/lib.rs" async-std = { version = "1", features = ["attributes", "tokio1"] } [dependencies.sea-orm-migration] -version = "0.12.0" +version = "0.12.15" features = [ # Enable at least one `ASYNC_RUNTIME` and `DATABASE_DRIVER` feature if you want to run migration via CLI. # View the list of supported features at https://www.sea-ql.org/SeaORM/docs/install-and-config/database-and-async-runtime. diff --git a/publish.sh b/publish.sh deleted file mode 100644 index fb250d7..0000000 --- a/publish.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!bin/bash - -## publish rust -cargo install rust-to-npm-cli - -# login to cargo -# cargo login - -# login to npm -npm adduser - -# build the cli and bpulish -rust-to-npm-cli deploy -b -n @opeolluwa/utils - - -cargo publish -p utils-cli-migration - - -cargo publish -p utils-cli-utils - - -cargo publish \ No newline at end of file diff --git a/src/parser.rs b/src/parser.rs index b199773..9be12ee 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -4,7 +4,7 @@ use commands::{ store::StoreCommands, }; -use crate::{commands, config, style::LogMessage}; +use crate::{commands}; //acf #[derive(Parser)]