Skip to content

Commit

Permalink
Test examples in CI [build should fail on purpose]
Browse files Browse the repository at this point in the history
  • Loading branch information
AZWN committed May 24, 2024
1 parent 24f562c commit eb7c784
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ jobs:
command: test
args: --all-features

- name: Run cargo examples tests
uses: actions-rs/cargo@v1
with:
command: test
args: --all-features --examples

test-stable:
name: Test Stable
runs-on: ubuntu-latest
Expand All @@ -92,3 +98,9 @@ jobs:
with:
command: test
args: --all-features

- name: Run cargo examples tests
uses: actions-rs/cargo@v1
with:
command: test
args: --all-features --examples
9 changes: 9 additions & 0 deletions scopegraphs/examples/records.rs
Original file line number Diff line number Diff line change
Expand Up @@ -817,3 +817,12 @@ in a.b.a.x;

Ok(())
}

#[cfg(test)]
mod tests {

#[test]
pub fn test_fail() {
panic!("test in example!")
}
}

0 comments on commit eb7c784

Please sign in to comment.