Skip to content

Commit

Permalink
Give up on wasm32 tests for now.
Browse files Browse the repository at this point in the history
  • Loading branch information
notpeter committed Apr 22, 2024
1 parent a35695f commit 90a8b87
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ jobs:
- name: Run tests
run: cargo test --locked --all-targets --verbose

# TODO: Support running tests for wasm targets.
build-and-test-wasm:
runs-on: ubuntu-22.04
steps:
Expand All @@ -59,7 +60,9 @@ jobs:
run: cargo --version
- name: Report rustc version
run: rustc --version
- name: Install wasm target
run: rustup target add wasm32-unknown-unknown
- name: Build
run: cargo build --locked --target wasm32-unknown-unknown --verbose
- name: Run tests
run: cargo test --locked --target wasm32-unknown-unknown --verbose
# - name: Run tests
# run: cargo test --locked --target wasm32-unknown-unknown --verbose
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ pub fn env_home_dir() -> Option<std::path::PathBuf> {
None
}

#[cfg(any(unix, windows))]
#[cfg(test)]
mod tests {
use super::env_home_dir;
Expand All @@ -82,7 +83,6 @@ mod tests {
*/

#[test]
#[cfg(any(unix, windows))]
fn env_home_test() {
let home_var = if cfg!(windows) { "USERPROFILE" } else { "HOME" };
let old = std::env::var(home_var).unwrap();
Expand Down

0 comments on commit 90a8b87

Please sign in to comment.