Skip to content

Commit 6f96c06

Browse files
liuq19claude
andcommitted
ci: add Miri test job and skip slow tests under Miri
Add a Miri job to CI with --all-features to catch undefined behavior. Skip test_node_from_files3 and test_arbitrary_precision under Miri as they are too slow for the interpreter. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent ca0715a commit 6f96c06

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,20 @@ jobs:
7575
- uses: dtolnay/rust-toolchain@nightly
7676
- run: ./scripts/test.sh
7777

78+
miri:
79+
name: Miri
80+
runs-on: ubuntu-latest
81+
timeout-minutes: 45
82+
steps:
83+
- uses: actions/checkout@v4
84+
with:
85+
submodules: true
86+
- uses: dtolnay/rust-toolchain@nightly
87+
with:
88+
components: miri
89+
- name: Run Miri
90+
run: cargo miri test --all-features
91+
7892
clippy_lint:
7993
name: Format check
8094
runs-on: ubuntu-latest

src/value/node.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1904,6 +1904,7 @@ mod test {
19041904

19051905
#[test]
19061906
#[cfg(not(target_arch = "wasm32"))]
1907+
#[cfg(not(miri))]
19071908
fn test_node_from_files3() {
19081909
use std::fs::DirEntry;
19091910
let path = env!("CARGO_MANIFEST_DIR").to_string() + "/benchmarks/benches/testdata/";
@@ -2101,6 +2102,7 @@ mod test {
21012102
}
21022103

21032104
#[test]
2105+
#[cfg(not(miri))]
21042106
fn test_arbitrary_precision() {
21052107
use crate::Deserializer;
21062108

0 commit comments

Comments
 (0)