Run with mutagen on travis.
[rust-lightning] / .github / workflows / build.yml
index cd9b9f63553609cab54fe8d25b474d6db40b97d8..50a3b7c04218d7c6c68655410ee9c1f9badc84e4 100644 (file)
@@ -7,7 +7,7 @@ jobs:
     strategy:
       matrix:
         toolchain: [ stable,
-                     beta,
+                     nightly,
                      # 1.22.0 is MSRV for rust-lightning in general:
                      1.22.0,
                      # 1.34.2 is Debian stable
@@ -17,8 +17,9 @@ jobs:
         include:
           - toolchain: stable
             build-net-tokio: true
-          - toolchain: beta
+          - toolchain: nightly
             build-net-tokio: true
+            run-mutagen: true
           - toolchain: 1.39.0
             build-net-tokio: true
             coverage: true
@@ -44,6 +45,16 @@ jobs:
       - name: Test on Rust ${{ matrix.toolchain }}
         if: "! matrix.build-net-tokio"
         run: RUSTFLAGS="-C link-dead-code" cargo test --verbose --color always  -p lightning
+      - name: Run mutagen tests on ${{ matrix.toolchain }}
+        if: matrix.run-mutagen
+     # Run mutagen on nightly with TheBlueMatt's fork which exits with non-0 status
+     # if any mutations resulted in anything except test failures to prevent regressions.
+        run: |
+          rm -rf mutagen && git clone https://github.com/TheBlueMatt/mutagen
+          cargo install --force --path mutagen/mutagen-runner
+          cd lightning
+          ~/.cargo/bin/cargo-mutagen --features mutation_testing
+     # Generate code cov information on Rust 1.39.0
       - name: Install deps for kcov
         if: matrix.coverage
         run: |