Skip to content

Commit

Permalink
fix test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
amrbashir committed Apr 29, 2024
1 parent 3dd7d16 commit e00c436
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 14 deletions.
13 changes: 2 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,5 @@ jobs:

steps:
- uses: actions/checkout@v4

- name: install stable
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- uses: actions-rs/cargo@v1
with:
command: test --release
- uses: dtolnay/rust-toolchain@stable
- run: cargo test --features test
3 changes: 3 additions & 0 deletions crates/nsis-process/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ license = { workspace = true }
[lib]
crate-type = ["cdylib"]

[features]
test = []

[dependencies]
nsis-plugin-api = { workspace = true }
windows-sys = { workspace = true }
4 changes: 3 additions & 1 deletion crates/nsis-process/build.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
fn main() {
println!("cargo::rustc-link-arg=/ENTRY:DllMain")
if std::env::var("CARGO_FEATURE_TEST").as_deref() != Ok("1") {
println!("cargo::rustc-link-arg=/ENTRY:DllMain")
}
}
3 changes: 3 additions & 0 deletions crates/nsis-semvercompare/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ license = { workspace = true }
[lib]
crate-type = ["cdylib"]

[features]
test = []

[dependencies]
semver = { version = "1.0", default-features = false }
nsis-plugin-api = { workspace = true }
Expand Down
4 changes: 3 additions & 1 deletion crates/nsis-semvercompare/build.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
fn main() {
println!("cargo::rustc-link-arg=/ENTRY:DllMain")
if std::env::var("CARGO_FEATURE_TEST").as_deref() != Ok("1") {
println!("cargo::rustc-link-arg=/ENTRY:DllMain")
}
}
3 changes: 3 additions & 0 deletions crates/nsis-tauri-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ license = { workspace = true }
[lib]
crate-type = ["cdylib"]

[features]
test = []

[dependencies]
nsis-plugin-api = { workspace = true }
windows-sys = { workspace = true }
Expand Down
4 changes: 3 additions & 1 deletion crates/nsis-tauri-utils/build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
fn main() {
combine_plugins_and_write_to_out_dir();
println!("cargo::rustc-link-arg=/ENTRY:DllMain")
if std::env::var("CARGO_FEATURE_TEST").as_deref() != Ok("1") {
println!("cargo::rustc-link-arg=/ENTRY:DllMain")
}
}

/// Combines the plugins into one file that is included in lib.rs
Expand Down

0 comments on commit e00c436

Please sign in to comment.