From dbea0f3b1ff15dbb70902190336ba38b01a0e0f8 Mon Sep 17 00:00:00 2001 From: Morgan Hill Date: Mon, 13 Nov 2023 02:44:08 +0100 Subject: [PATCH] Add tests with miri to CI (#1071) --- .github/workflows/build.yml | 9 +++++++++ src/lib.rs | 1 + 2 files changed, 10 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7115ec73c..554239be5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -50,3 +50,12 @@ jobs: if: (!contains(matrix.platform.target, 'android') && !contains(matrix.platform.target, 'ios')) run: cargo test --verbose --target ${{ matrix.platform.target }} --features linux-body + - name: install nightly + uses: dtolnay/rust-toolchain@nightly + with: + targets: ${{ matrix.platform.target }} + components: miri + + - name: Run tests with miri + if: (!contains(matrix.platform.target, 'android') && !contains(matrix.platform.target, 'ios')) + run: cargo +nightly miri test --verbose --target ${{ matrix.platform.target }} --features linux-body diff --git a/src/lib.rs b/src/lib.rs index f939132a5..6e7717df0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1582,6 +1582,7 @@ mod tests { use super::*; #[test] + #[cfg_attr(miri, ignore)] fn should_get_webview_version() { if let Err(error) = webview_version() { panic!("{}", error);