Skip to content

Commit 38b9044

Browse files
committed
Workspace CI fixes
1 parent 04029c5 commit 38b9044

6 files changed

Lines changed: 14 additions & 14 deletions

File tree

.githooks/pre-push

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ fi
3737

3838
echo "🔎 pre-push: running checks that mirror GitHub CI"
3939
echo "• cargo test"
40-
cargo test
40+
cargo test --workspace --all-features
4141

42-
echo "• cargo clippy -- -D warnings"
43-
cargo clippy -- -D warnings
42+
echo "• cargo clippy"
43+
cargo clippy --workspace --all-targets --all-features -- -D warnings
4444

45-
echo "• cargo fmt --all -- --check"
45+
echo "• cargo fmt"
4646
cargo fmt --all -- --check
4747

4848
echo "✅ pre-push: all checks passed"

.github/workflows/ci.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ jobs:
3333
- name: Install Dependencies
3434
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev
3535
- name: Run cargo test
36-
run: cargo test
36+
run: cargo test --workspace --all-features
3737

38-
# Run cargo clippy -- -D warnings
38+
# Run cargo clippy
3939
clippy_check:
4040
name: Clippy
4141
runs-on: ubuntu-latest
@@ -60,7 +60,7 @@ jobs:
6060
- name: Install Dependencies
6161
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev
6262
- name: Run clippy
63-
run: cargo clippy -- -D warnings
63+
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
6464

6565
# Run cargo doc with rustdoc warnings denied
6666
docs:
@@ -85,9 +85,9 @@ jobs:
8585
- name: Install Dependencies
8686
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev
8787
- name: Run cargo doc
88-
run: RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --workspace --all-features --exclude guest_wit_example --exclude host_wit_example --exclude simple
88+
run: RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --workspace --all-features
8989

90-
# Run cargo fmt --all -- --check
90+
# Run cargo fmt
9191
format:
9292
name: Format
9393
runs-on: ubuntu-latest

crates/wasvy_cli/src/dependency.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ impl Dependency {
7373
}
7474

7575
pub fn resolve(&self, path: impl AsRef<Path>, resolve: &mut Resolve) -> Result<PackageId> {
76-
let path = path.as_ref().join(&self.file_name());
76+
let path = path.as_ref().join(self.file_name());
7777
resolve.push_str(path, &self.interface)
7878
}
7979

@@ -109,7 +109,7 @@ impl Dependency {
109109

110110
impl WriteTo for Dependency {
111111
fn write(&self, path: impl AsRef<Path>) -> Result<()> {
112-
let path = path.as_ref().join(&self.file_name());
112+
let path = path.as_ref().join(self.file_name());
113113
write(&path, self.interface.as_bytes())
114114
}
115115
}

crates/wasvy_cli/src/languages/python.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ impl Language for Python {
105105
}
106106

107107
fn get_name(path: &Path) -> Option<String> {
108-
let contents = fs::read_to_string(&path).ok()?;
108+
let contents = fs::read_to_string(path).ok()?;
109109
let value = contents.parse::<toml::Table>().ok()?;
110110
value
111111
.get("project")?

crates/wasvy_cli/src/languages/rust.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ impl Language for Rust {
125125
}
126126

127127
fn get_name(path: &Path) -> Option<String> {
128-
let contents = fs::read_to_string(&path).ok()?;
128+
let contents = fs::read_to_string(path).ok()?;
129129
let value = contents.parse::<toml::Table>().ok()?;
130130
value
131131
.get("package")?

crates/wasvy_cli/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ fn main() {
1515
// Create the CLI runtime
1616
let runtime = {
1717
let mut config = Config::default();
18-
for dep in remote.dependencies {
18+
for dep in remote.dependencies.iter() {
1919
let name = format!("{dep}");
2020
if let Err(err) = config.add_dependency(dep) {
2121
println!("Could not resolve remote dependency {name} because: {err:?}");

0 commit comments

Comments
 (0)