Skip to content

Commit

Permalink
chore: various maintenance
Browse files Browse the repository at this point in the history
1. Clean-up Dependency Versions (major version only).
2. Remove Unused Dependences.
3. Add Unused Dependency Checker to Testing Workflow.
4. Coverage dose not include examples and benchmarks.
  • Loading branch information
da2ce7 committed Mar 20, 2024
1 parent ea33f1c commit 1c59d89
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 45 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:

- id: test
name: Run Unit Tests
run: cargo test --tests --benches --examples --workspace --all-targets --all-features
run: cargo test --tests --workspace --all-targets --all-features

- id: coverage
name: Generate Coverage Report
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ jobs:
name: Enable Workflow Cache
uses: Swatinem/rust-cache@v2

- id: tools
name: Install Tools
uses: taiki-e/install-action@v2
with:
tool: cargo-machete

- id: check
name: Run Build Checks
run: cargo check --tests --benches --examples --workspace --all-targets --all-features
Expand All @@ -71,6 +77,14 @@ jobs:
RUSTDOCFLAGS: "-D warnings"
run: cargo doc --no-deps --bins --examples --workspace --all-features

- id: clean
name: Clean Build Directory
run: cargo clean

- id: deps
name: Check Unused Dependencies
run: cargo machete


unit:
name: Units
Expand Down
20 changes: 0 additions & 20 deletions Cargo.lock

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

32 changes: 14 additions & 18 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,35 +30,37 @@ rust-version = "1.72"
version = "3.0.0-alpha.12-develop"

[dependencies]
anyhow = "1"
aquatic_udp_protocol = "0"
async-trait = "0"
axum = { version = "0", features = ["macros"] }
axum-client-ip = "0"
axum-extra = { version = "0.9.2", features = ["query"] }
axum-extra = { version = "0", features = ["query"] }
axum-server = { version = "0", features = ["tls-rustls"] }
binascii = "0"
chrono = { version = "0", default-features = false, features = ["clock"] }
clap = { version = "4", features = ["derive", "env"] }
colored = "2"
config = "0"
derive_more = "0"
fern = "0"
futures = "0"
hex-literal = "0"
hyper = "1"
lazy_static = "1"
log = { version = "0", features = ["release_max_level_info"] }
multimap = "0"
openssl = { version = "0", features = ["vendored"] }
percent-encoding = "2"
r2d2 = "0"
r2d2_mysql = "24"
r2d2_sqlite = { version = "0", features = ["bundled"] }
rand = "0"
reqwest = "0"
reqwest = { version = "0", features = ["json"] }
ringbuf = "0"
serde = { version = "1", features = ["derive"] }
serde_bencode = "0"
serde_bytes = "0"
serde_json = "1"
ringbuf = "0"
serde_with = "3"
serde_repr = "0"
tdyne-peer-id = "1"
tdyne-peer-id-registry = "0"
Expand All @@ -68,24 +70,18 @@ torrust-tracker-configuration = { version = "3.0.0-alpha.12-develop", path = "pa
torrust-tracker-contrib-bencode = { version = "3.0.0-alpha.12-develop", path = "contrib/bencode" }
torrust-tracker-located-error = { version = "3.0.0-alpha.12-develop", path = "packages/located-error" }
torrust-tracker-primitives = { version = "3.0.0-alpha.12-develop", path = "packages/primitives" }
tower-http = { version = "0", features = ["compression-full", "cors", "trace", "propagate-header", "request-id"] }
tower-http = { version = "0", features = ["compression-full", "cors", "propagate-header", "request-id", "trace"] }
trace = "0"
tracing = "0"
url = "2"
uuid = { version = "1", features = ["v4"] }
colored = "2.1.0"
url = "2.5.0"
tempfile = "3.9.0"
clap = { version = "4.4.18", features = ["derive", "env"]}
anyhow = "1.0.79"
hex-literal = "0.4.1"
trace = "0.1.7"
tracing = "0.1.40"

[package.metadata.cargo-machete]
ignored = ["serde_bytes"]

[dev-dependencies]
criterion = { version = "0.5.1", features = ["async_tokio"] }
local-ip-address = "0"
mockall = "0"
once_cell = "1.18.0"
reqwest = { version = "0", features = ["json"] }
serde_urlencoded = "0"
torrust-tracker-test-helpers = { version = "3.0.0-alpha.12-develop", path = "packages/test-helpers" }

[workspace]
Expand Down
1 change: 0 additions & 1 deletion packages/configuration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ version.workspace = true
[dependencies]
config = "0"
derive_more = "0"
log = { version = "0", features = ["release_max_level_info"] }
serde = { version = "1", features = ["derive"] }
serde_with = "3"
thiserror = "1"
Expand Down
1 change: 0 additions & 1 deletion packages/test-helpers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ rust-version.workspace = true
version.workspace = true

[dependencies]
lazy_static = "1"
rand = "0"
torrust-tracker-configuration = { version = "3.0.0-alpha.12-develop", path = "../configuration" }
torrust-tracker-primitives = { version = "3.0.0-alpha.12-develop", path = "../primitives" }
9 changes: 5 additions & 4 deletions packages/torrent-repository-benchmarks/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
[package]
description = "A set of benchmarks for the torrent repository"
keywords = ["benchmarking", "library", "repository", "torrent"]
name = "torrust-torrent-repository-benchmarks"
readme = "README.md"

authors.workspace = true
categories.workspace = true
description.workspace = true
documentation.workspace = true
edition.workspace = true
homepage.workspace = true
keywords.workspace = true
license.workspace = true
publish.workspace = true
repository.workspace = true
Expand All @@ -18,4 +19,4 @@ aquatic_udp_protocol = "0.8.0"
clap = { version = "4.4.8", features = ["derive"] }
futures = "0.3.29"
tokio = { version = "1", features = ["macros", "net", "rt-multi-thread", "signal", "sync"] }
torrust-tracker = { path = "../../" }
torrust-tracker = { path = "../../" }
1 change: 1 addition & 0 deletions packages/torrent-repository-benchmarks/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Benchmarks of the torrent repository

0 comments on commit 1c59d89

Please sign in to comment.