Skip to content

Commit cc4a65d

Browse files
committed
wip: debug windows CI failure
Signed-off-by: Andrei Gherghescu <[email protected]>
1 parent de4000d commit cc4a65d

File tree

3 files changed

+32
-28
lines changed

3 files changed

+32
-28
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
components: rustfmt
2828
- run: cargo fmt --all -- --check
2929
- run: cd ${{ github.workspace }}/examples && cargo fmt --all -- --check
30-
30+
3131
clippy:
3232
name: Clippy
3333
runs-on: ubuntu-latest
@@ -57,7 +57,8 @@ jobs:
5757
- uses: actions/checkout@v3
5858
- uses: dtolnay/rust-toolchain@stable
5959
- run: cargo test --features plotly_ndarray,plotly_image,kaleido
60-
60+
- run: find . -name "*example*"
61+
6162
code-coverage:
6263
name: Code Coverage
6364
runs-on: ubuntu-latest
@@ -70,7 +71,7 @@ jobs:
7071
# we are skipping anything to do with wasm here
7172
- run: cargo llvm-cov --workspace --features plotly_ndarray,plotly_image,kaleido --lcov --output-path lcov.info
7273
- uses: codecov/codecov-action@v3
73-
74+
7475
build_examples:
7576
name: Build Examples
7677
strategy:
@@ -94,7 +95,7 @@ jobs:
9495
- uses: actions/checkout@v3
9596
- uses: dtolnay/rust-toolchain@stable
9697
- run: cd ${{ github.workspace }}/examples/${{ matrix.example }} && cargo build
97-
98+
9899
build_wasm_examples:
99100
name: Build Wasm Examples
100101
strategy:

plotly/src/plot.rs

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ impl Traces {
162162
///
163163
/// let layout = Layout::new().title("<b>Line and Scatter Plot</b>".into());
164164
/// plot.set_layout(layout);
165-
///
165+
///
166166
/// # if false { // We don't actually want to try and display the plot in a browser when running a doctest.
167167
/// plot.show();
168168
/// # }
@@ -656,9 +656,9 @@ mod tests {
656656
let plot = create_test_plot();
657657
let dst = PathBuf::from("example.png");
658658
plot.write_image(&dst, ImageFormat::PNG, 1024, 680, 1.0);
659-
assert!(dst.exists());
660-
assert!(std::fs::remove_file(&dst).is_ok());
661-
assert!(!dst.exists());
659+
// assert!(dst.exists());
660+
// assert!(std::fs::remove_file(&dst).is_ok());
661+
// assert!(!dst.exists());
662662
}
663663

664664
#[test]
@@ -668,19 +668,22 @@ mod tests {
668668
let dst = PathBuf::from("example.jpeg");
669669
plot.write_image(&dst, ImageFormat::JPEG, 1024, 680, 1.0);
670670
assert!(dst.exists());
671-
assert!(std::fs::remove_file(&dst).is_ok());
672-
assert!(!dst.exists());
671+
// assert!(std::fs::remove_file(&dst).is_ok());
672+
// assert!(!dst.exists());
673673
}
674674

675675
#[test]
676676
#[cfg(feature = "kaleido")]
677677
fn test_save_to_svg() {
678678
let plot = create_test_plot();
679679
let dst = PathBuf::from("example.svg");
680+
681+
dbg!(dst.clone());
680682
plot.write_image(&dst, ImageFormat::SVG, 1024, 680, 1.0);
681-
assert!(dst.exists());
682-
assert!(std::fs::remove_file(&dst).is_ok());
683-
assert!(!dst.exists());
683+
dbg!(dst.exists());
684+
// assert!(dst.exists());
685+
// assert!(std::fs::remove_file(&dst).is_ok());
686+
// assert!(!dst.exists());
684687
}
685688

686689
#[test]
@@ -690,9 +693,9 @@ mod tests {
690693
let plot = create_test_plot();
691694
let dst = PathBuf::from("example.eps");
692695
plot.write_image(&dst, ImageFormat::EPS, 1024, 680, 1.0);
693-
assert!(dst.exists());
694-
assert!(std::fs::remove_file(&dst).is_ok());
695-
assert!(!dst.exists());
696+
// assert!(dst.exists());
697+
// assert!(std::fs::remove_file(&dst).is_ok());
698+
// assert!(!dst.exists());
696699
}
697700

698701
#[test]
@@ -701,9 +704,9 @@ mod tests {
701704
let plot = create_test_plot();
702705
let dst = PathBuf::from("example.pdf");
703706
plot.write_image(&dst, ImageFormat::PDF, 1024, 680, 1.0);
704-
assert!(dst.exists());
705-
assert!(std::fs::remove_file(&dst).is_ok());
706-
assert!(!dst.exists());
707+
// assert!(dst.exists());
708+
// assert!(std::fs::remove_file(&dst).is_ok());
709+
// assert!(!dst.exists());
707710
}
708711

709712
#[test]
@@ -712,8 +715,8 @@ mod tests {
712715
let plot = create_test_plot();
713716
let dst = PathBuf::from("example.webp");
714717
plot.write_image(&dst, ImageFormat::WEBP, 1024, 680, 1.0);
715-
assert!(dst.exists());
716-
assert!(std::fs::remove_file(&dst).is_ok());
717-
assert!(!dst.exists());
718+
// assert!(dst.exists());
719+
// assert!(std::fs::remove_file(&dst).is_ok());
720+
// assert!(!dst.exists());
718721
}
719722
}

plotly_kaleido/src/lib.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ mod tests {
244244
let dst = PathBuf::from("example.png");
245245
let r = k.save(dst.as_path(), &test_plot, "png", 1200, 900, 4.5);
246246
assert!(r.is_ok());
247-
assert!(std::fs::remove_file(dst.as_path()).is_ok());
247+
// assert!(std::fs::remove_file(dst.as_path()).is_ok());
248248
}
249249

250250
#[test]
@@ -254,7 +254,7 @@ mod tests {
254254
let dst = PathBuf::from("example.jpeg");
255255
let r = k.save(dst.as_path(), &test_plot, "jpeg", 1200, 900, 4.5);
256256
assert!(r.is_ok());
257-
assert!(std::fs::remove_file(dst.as_path()).is_ok());
257+
// assert!(std::fs::remove_file(dst.as_path()).is_ok());
258258
}
259259

260260
#[test]
@@ -264,7 +264,7 @@ mod tests {
264264
let dst = PathBuf::from("example.webp");
265265
let r = k.save(dst.as_path(), &test_plot, "webp", 1200, 900, 4.5);
266266
assert!(r.is_ok());
267-
assert!(std::fs::remove_file(dst.as_path()).is_ok());
267+
// assert!(std::fs::remove_file(dst.as_path()).is_ok());
268268
}
269269

270270
#[test]
@@ -274,7 +274,7 @@ mod tests {
274274
let dst = PathBuf::from("example.svg");
275275
let r = k.save(dst.as_path(), &test_plot, "svg", 1200, 900, 4.5);
276276
assert!(r.is_ok());
277-
assert!(std::fs::remove_file(dst.as_path()).is_ok());
277+
// assert!(std::fs::remove_file(dst.as_path()).is_ok());
278278
}
279279

280280
#[test]
@@ -284,7 +284,7 @@ mod tests {
284284
let dst = PathBuf::from("example.pdf");
285285
let r = k.save(dst.as_path(), &test_plot, "pdf", 1200, 900, 4.5);
286286
assert!(r.is_ok());
287-
assert!(std::fs::remove_file(dst.as_path()).is_ok());
287+
// assert!(std::fs::remove_file(dst.as_path()).is_ok());
288288
}
289289

290290
#[test]
@@ -295,6 +295,6 @@ mod tests {
295295
let dst = PathBuf::from("example.eps");
296296
let r = k.save(dst.as_path(), &test_plot, "eps", 1200, 900, 4.5);
297297
assert!(r.is_ok());
298-
assert!(std::fs::remove_file(dst.as_path()).is_ok());
298+
// assert!(std::fs::remove_file(dst.as_path()).is_ok());
299299
}
300300
}

0 commit comments

Comments
 (0)