Skip to content

Commit 685e55a

Browse files
boukclaude
andcommitted
Add GitHub Actions workflow for testing
Runs the test suite (debug + release, with and without serialization) on Linux/macOS/Windows, the full suite under Miri including the threaded stress tests, and a wasm32-unknown-unknown release build. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent c2b61f8 commit 685e55a

1 file changed

Lines changed: 50 additions & 0 deletions

File tree

.github/workflows/test.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: test
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
11+
jobs:
12+
test:
13+
name: test (${{ matrix.os }})
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
os: [ubuntu-latest, macos-latest, windows-latest]
19+
steps:
20+
- uses: actions/checkout@v7
21+
- uses: dtolnay/rust-toolchain@stable
22+
- uses: Swatinem/rust-cache@v2
23+
- run: cargo test
24+
- run: cargo test --features serialization
25+
- run: cargo test --release --features serialization
26+
27+
# The tests build with tiny table and arena sizes (see src/stringcache.rs)
28+
# so this exercises table growth and migration under Miri's data-race and
29+
# provenance checking, including the threaded stress tests.
30+
miri:
31+
name: miri
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v7
35+
- uses: dtolnay/rust-toolchain@nightly
36+
with:
37+
components: miri
38+
- uses: Swatinem/rust-cache@v2
39+
- run: cargo miri test
40+
41+
wasm32:
42+
name: wasm32 build
43+
runs-on: ubuntu-latest
44+
steps:
45+
- uses: actions/checkout@v7
46+
- uses: dtolnay/rust-toolchain@stable
47+
with:
48+
targets: wasm32-unknown-unknown
49+
- uses: Swatinem/rust-cache@v2
50+
- run: cargo build --release --target wasm32-unknown-unknown

0 commit comments

Comments
 (0)