Skip to content
Merged
32 changes: 32 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Check & Clippy

on:
push

env:
CARGO_TERM_COLOR: always

jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- uses: Swatinem/rust-cache@v2

- name: cargo check (server feature)
run: cargo check --workspace --features server

clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: clippy
- uses: Swatinem/rust-cache@v2

- name: clippy
run: cargo clippy --workspace --features server -- -D warnings
18 changes: 18 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Documentation

on:
push

jobs:
doc:
name: Build Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- uses: Swatinem/rust-cache@v2

- name: cargo doc
run: cargo doc --workspace --features server --no-deps
env:
RUSTDOCFLAGS: "-D warnings"
25 changes: 25 additions & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Integration Tests

on:
push

env:
CARGO_TERM_COLOR: always

jobs:
integration-tests:
name: Integration Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- uses: Swatinem/rust-cache@v2

- name: Run message integration tests
run: cargo test --test message --features server,anyhow

- name: Install smbclient
run: sudo apt-get update && sudo apt-get install -y smbclient

- name: Run smbclient integration tests
run: cargo test --test smbclient --features server,anyhow -- --ignored
19 changes: 19 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Unit Tests

on:
push

env:
CARGO_TERM_COLOR: always

jobs:
unit-tests:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- uses: Swatinem/rust-cache@v2

- name: Run unit tests
run: cargo test --lib --features server
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion smb-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "smb-core"
version = "0.1.0"
edition = "2021"
edition = "2024"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
2 changes: 1 addition & 1 deletion smb-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ impl SMBVecFromBytesCnt for String {

impl SMBVecByteSize for String {
fn smb_byte_size_vec(&self, align: usize, _: usize) -> usize {
self.as_bytes().len() * align
self.len() * align
}
}

Expand Down
6 changes: 5 additions & 1 deletion smb-derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.0.1"
authors = ["Tejas Mehta <tmthecoder@gmail.com>"]
description = "A `cargo generate` template for quick-starting a procedural macro crate"
keywords = ["template", "proc_macro", "procmacro"]
edition = "2021"
edition = "2024"

[lib]
proc-macro = true
Expand All @@ -15,3 +15,7 @@ darling = "0.20.1"
quote = "1.0.32"
proc-macro2 = "1.0.66"
num_enum = "0.5.7"

[dev-dependencies]
smb-core = { path = "../smb-core" }
num_enum = "0.5.7"
Loading
Loading