@@ -50,13 +50,53 @@ jobs:
5050 run : cargo fmt --check --manifest-path native/ecto_libsql/Cargo.toml
5151
5252 - name : Run Clippy
53- run : cargo clippy --manifest-path native/ecto_libsql/Cargo.toml --all-targets --all-features
54- # Note: Currently not treating warnings as errors due to await_holding_lock warnings
55- # These should be addressed in a future PR by using async-aware Mutex types
53+ run : cargo clippy --manifest-path native/ecto_libsql/Cargo.toml --all-targets --all-features -- -D warnings
5654
5755 - name : Run Rust tests
5856 run : cargo test --manifest-path native/ecto_libsql/Cargo.toml --all-features
5957
58+ - name : Check licences and security advisories
59+ working-directory : native/ecto_libsql
60+ run : cargo deny check licenses advisories
61+
62+ rust-fuzz :
63+ name : Rust Fuzz Testing
64+ runs-on : ubuntu-latest
65+ needs : [rust-checks]
66+
67+ steps :
68+ - name : Checkout code
69+ uses : actions/checkout@v6
70+
71+ - name : Set up Rust nightly
72+ uses : dtolnay/rust-toolchain@nightly
73+ with :
74+ components : llvm-tools-preview
75+
76+ - name : Cache Rust dependencies
77+ uses : actions/cache@v4
78+ with :
79+ path : |
80+ ~/.cargo/bin/
81+ ~/.cargo/registry/index/
82+ ~/.cargo/registry/cache/
83+ ~/.cargo/git/db/
84+ native/ecto_libsql/target/
85+ native/ecto_libsql/fuzz/target/
86+ key : ${{ runner.os }}-fuzz-${{ hashFiles('**/Cargo.toml') }}
87+ restore-keys : |
88+ ${{ runner.os }}-fuzz-
89+
90+ - name : Run fuzz tests (30 seconds each)
91+ working-directory : native/ecto_libsql
92+ run : |
93+ for target in $(cargo +nightly fuzz list); do
94+ echo "Running $target..."
95+ cargo +nightly fuzz run "$target" -- -max_total_time=30
96+ done
97+
98+ echo "All fuzz tests passed!"
99+
60100 elixir-tests-latest :
61101 name : Elixir ${{ matrix.elixir }} / OTP ${{ matrix.otp }} / ${{ matrix.os }}
62102 runs-on : ${{ matrix.os }}
@@ -307,6 +347,7 @@ jobs:
307347 needs :
308348 [
309349 rust-checks,
350+ rust-fuzz,
310351 elixir-tests-latest,
311352 elixir-tests-compatibility,
312353 integration-test,
@@ -318,6 +359,7 @@ jobs:
318359 - name : Check if all jobs passed
319360 run : |
320361 if [ "${{ needs.rust-checks.result }}" != "success" ] || \
362+ [ "${{ needs.rust-fuzz.result }}" != "success" ] || \
321363 [ "${{ needs.elixir-tests-latest.result }}" != "success" ] || \
322364 [ "${{ needs.elixir-tests-compatibility.result }}" != "success" ] || \
323365 [ "${{ needs.integration-test.result }}" != "success" ]; then
0 commit comments