diff --git a/.gitea/workflows/pr.yml b/.gitea/workflows/pr.yml new file mode 100644 index 0000000..f994815 --- /dev/null +++ b/.gitea/workflows/pr.yml @@ -0,0 +1,42 @@ +name: textsender_models PR + +on: + pull_request: + branches: + - main + +jobs: + check: + name: Check + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v5 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: 1.96 + - uses: Swatinem/rust-cache@v2 + - run: cargo check + + fmt: + name: Rustfmt + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v5 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: 1.96 + - uses: Swatinem/rust-cache@v2 + - run: rustup component add rustfmt + - run: cargo fmt --all -- --check + + clippy: + name: Clippy + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v5 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: 1.96 + - uses: Swatinem/rust-cache@v2 + - run: rustup component add clippy + - run: cargo clippy -- -D warnings diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 220e516..b69247c 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -20,7 +20,7 @@ jobs: - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: 1.95 + toolchain: 1.96 components: cargo - name: Extract Version from Cargo.toml diff --git a/.gitea/workflows/rust.yml b/.gitea/workflows/rust.yml index ddad6a8..c8a0d72 100644 --- a/.gitea/workflows/rust.yml +++ b/.gitea/workflows/rust.yml @@ -4,9 +4,6 @@ on: push: branches: - main - pull_request: - branches: - - main jobs: check: @@ -16,7 +13,7 @@ jobs: - uses: actions/checkout@v5 - uses: actions-rust-lang/setup-rust-toolchain@v1 with: - toolchain: 1.95 + toolchain: 1.96 - uses: Swatinem/rust-cache@v2 - run: cargo check @@ -27,7 +24,7 @@ jobs: - uses: actions/checkout@v5 - uses: actions-rust-lang/setup-rust-toolchain@v1 with: - toolchain: 1.95 + toolchain: 1.96 - uses: Swatinem/rust-cache@v2 - run: cargo test @@ -38,7 +35,7 @@ jobs: - uses: actions/checkout@v5 - uses: actions-rust-lang/setup-rust-toolchain@v1 with: - toolchain: 1.95 + toolchain: 1.96 - uses: Swatinem/rust-cache@v2 - run: rustup component add rustfmt - run: cargo fmt --all -- --check @@ -50,7 +47,7 @@ jobs: - uses: actions/checkout@v5 - uses: actions-rust-lang/setup-rust-toolchain@v1 with: - toolchain: 1.95 + toolchain: 1.96 - uses: Swatinem/rust-cache@v2 - run: rustup component add clippy - run: cargo clippy -- -D warnings @@ -62,6 +59,6 @@ jobs: - uses: actions/checkout@v5 - uses: actions-rust-lang/setup-rust-toolchain@v1 with: - toolchain: 1.95 + toolchain: 1.96 - uses: Swatinem/rust-cache@v2 - run: cargo build diff --git a/Cargo.lock b/Cargo.lock index f36b92a..7ba6270 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -93,7 +93,6 @@ version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" dependencies = [ - "powerfmt", "serde_core", ] @@ -522,7 +521,7 @@ dependencies = [ [[package]] name = "textsender_models" -version = "0.3.3" +version = "0.4.0" dependencies = [ "const_format", "dotenvy", @@ -556,12 +555,11 @@ dependencies = [ [[package]] name = "time" -version = "0.3.47" +version = "0.3.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" +checksum = "711a53c2d47bbd818258c498c8dbfe186a2526c631495cfe7e078567f86b8469" dependencies = [ "deranged", - "itoa", "num-conv", "powerfmt", "serde_core", @@ -571,15 +569,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" +checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" [[package]] name = "time-macros" -version = "0.2.27" +version = "0.2.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215" +checksum = "71c652a3727a9cbb9a02f707f530b618ce00d0ccd762009c8c23bd191df3c17d" dependencies = [ "num-conv", "time-core", diff --git a/Cargo.toml b/Cargo.toml index b25c08c..7dfc32b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,18 +1,28 @@ [package] name = "textsender_models" -version = "0.3.3" +version = "0.4.0" edition = "2024" -rust-version = "1.95" +rust-version = "1.96" description = "Models used for the textsender project" [dependencies] serde = { version = "1.0.228", features = ["derive"] } -serde_json = { version = "1.0.149" } -time = { version = "0.3.47", features = ["formatting", "macros", "parsing", "serde"] } -uuid = { version = "1.23.1", features = ["v4", "serde"] } +serde_json = { version = "1.0.150" } +time = { version = "0.3.49", features = ["formatting", "macros", "parsing", "serde"] } +uuid = { version = "1.23.3", features = ["v4", "serde"] } dotenvy = { version = "0.15.7" } const_format = { version = "0.2.36" } josekit = { version = "0.10.3" } -utoipa = { version = "5.4.0", features = ["uuid", "time"] } +utoipa = { version = "5.5.0", features = ["uuid", "time"] } + +[features] +default = ["full"] +full = ["user", "message", "contact", "config", "envy", "token"] +user = [] +message = [] +contact = [] +config = [] +envy = [] +token = [] [dev-dependencies]