From 86e3bca02e4af8f54b3e740d9eafabcfabfc00f4 Mon Sep 17 00:00:00 2001 From: Morgan Hill Date: Fri, 10 Nov 2023 17:28:14 +0100 Subject: [PATCH] Add tests with miri to CI --- .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 98dc32c5c..8b229779a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1568,6 +1568,7 @@ mod tests { use super::*; #[test] + #[cfg_attr(miri, ignore)] fn should_get_webview_version() { if let Err(error) = webview_version() { panic!("{}", error);