Skip to content

Commit

Permalink
Refactor crate, make it usable (#11)
Browse files Browse the repository at this point in the history
Co-authored-by: Drew Stone <[email protected]>
  • Loading branch information
Serial-ATA and drewstone authored Jan 31, 2025
1 parent 989c878 commit b225050
Show file tree
Hide file tree
Showing 36 changed files with 2,380 additions and 2,560 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ jobs:
steps:
- name: checkout code
uses: actions/checkout@v4
with:
submodules: "recursive"

- name: install rust
uses: dtolnay/rust-toolchain@nightly
Expand Down
134 changes: 119 additions & 15 deletions Cargo.lock

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

44 changes: 24 additions & 20 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,16 @@ name = "dockworker"
version = "0.1.0"
edition = "2021"

[features]
default = []
docker = [
"async-trait",
"bollard",
"futures",
"futures-util",
"ipnet",
"reqwest",
"tar",
"tempfile",
"tokio",
"tracing",
"sysinfo",
"uuid",
"walkdir",
]

[dependencies]
# Core dependencies (always included)
cfg-if = "1.0.0"
regex = "1.11.1"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_yaml = "0.9"
shell-words = "1.1"
thiserror = "2.0"
log = "0.4.25"
log = "0.4"

# Optional dependencies (only with deploy feature)
bollard = { version = "0.17", optional = true }
Expand All @@ -46,9 +29,30 @@ futures = { version = "0.3.31", optional = true }
walkdir = { version = "2.5.0", optional = true }
tracing = { version = "0.1.41", optional = true }

# Used in tests
color-eyre = { version = "0.6.3", optional = true }

[dev-dependencies]
dockworker = { path = ".", features = ["docker"] }
dockworker = { path = ".", features = ["docker", "testing"] }
tokio = { version = "1.0", features = ["full"] }
pretty_assertions = "1.4.1"
reqwest = "0.12.12"

[features]
default = []
docker = [
"async-trait",
"bollard",
"futures",
"futures-util",
"ipnet",
"reqwest",
"tar",
"tempfile",
"tokio",
"tracing",
"sysinfo",
"uuid",
"walkdir",
]
testing = ["dep:color-eyre"]
Loading

0 comments on commit b225050

Please sign in to comment.