Bump LDK to 0.0.121/rust-bitcoin 0.30, bumping MSRV to 1.63
[rapid-gossip-sync-server] / .github / workflows / build.yml
index fce9797d0a9f0f6520d15d56fff68eb3bb41f0ae..33d52399db50c819a3428c8fadab94b5bc1e9046 100644 (file)
@@ -7,6 +7,10 @@ on:
     branches:
       - "*"
 
+concurrency:
+  group: ${{ github.workflow }}-${{ github.ref }}
+  cancel-in-progress: true
+
 jobs:
   build:
     strategy:
@@ -14,7 +18,7 @@ jobs:
       matrix:
         toolchain:
           - stable
-          - 1.48.0
+          - 1.63.0
           - beta
     runs-on: ubuntu-latest
     steps:
@@ -29,3 +33,35 @@ jobs:
       - name: Build on Rust ${{ matrix.toolchain }}
         run: |
           cargo build --verbose --color always
+  test:
+    runs-on: ubuntu-latest
+    services:
+      postgres:
+        image: postgres
+        env:
+          POSTGRES_PASSWORD: postgres
+        options: >-
+          --health-cmd pg_isready
+          --health-interval 10s
+          --health-timeout 5s
+          --health-retries 5
+        ports:
+          - 5432:5432
+    steps:
+      - name: Checkout source code
+        uses: actions/checkout@v3
+      - name: Install Rust ${{ matrix.toolchain }} toolchain
+        uses: actions-rs/toolchain@v1
+        with:
+          toolchain: stable
+          override: true
+          profile: minimal
+      - name: Run tests
+        run: |
+          cargo test --verbose --color always -- --show-output
+        env:
+          RAPID_GOSSIP_TEST_DB_HOST: localhost
+          RAPID_GOSSIP_TEST_DB_NAME: postgres
+          RAPID_GOSSIP_TEST_DB_USER: postgres
+          RAPID_GOSSIP_TEST_DB_PASSWORD: postgres
+          RAPID_GOSSIP_SYNC_SERVER_LOG_LEVEL: gossip