]> Untitled Git - bdk/commitdiff
[ci] Test the examples in README.md
authorAlekos Filini <alekos.filini@gmail.com>
Thu, 10 Dec 2020 10:21:49 +0000 (11:21 +0100)
committerAlekos Filini <alekos.filini@gmail.com>
Fri, 11 Dec 2020 10:16:36 +0000 (11:16 +0100)
.github/workflows/cont_integration.yml

index e13718ea57a018f231e3bd5a6cbb62ef02c8b3e2..e77036cc7989701435f57d2981e68668e885f520 100644 (file)
@@ -57,6 +57,27 @@ jobs:
         if: ${{ matrix.test != 'skip' }}
         run: cargo test --features ${{ matrix.features }} --no-default-features
 
+  test-readme-examples:
+    name: Test README.md examples
+    runs-on: ubuntu-latest
+    steps:
+      - name: checkout
+        uses: actions/checkout@v2
+      - name: cache
+        uses: actions/cache@v2
+        with:
+          path: |
+            ~/.cargo/registry
+            ~/.cargo/git
+            target
+          key: ${{ runner.os }}-cargo-test-md-docs-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
+      - name: Set default toolchain
+        run: rustup default nightly
+      - name: Set profile
+        run: rustup set profile minimal
+      - name: Test
+        run: cargo test --features test-md-docs --no-default-features -- doctest::ReadmeDoctests
+
   test-electrum:
     name: Test electrum
     runs-on: ubuntu-16.04