diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index 8e3fd7581..9d2bdcdf1 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -107,7 +107,7 @@ jobs: - uses: actions/cache@v3 name: Cache cabal store with: - path: | + path: | ${{ steps.setup-haskell.outputs.cabal-store }} dist-newstyle key: cache-cabal-store-v1-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('dependencies.txt') }} @@ -144,3 +144,15 @@ jobs: - name: Run tests run: cabal test all -j1 + + - name: Check that Schema Migrations are complete + id: schema_check + run: | + PGPASSFILE=config/pgpass-mainnet cabal run cardano-db-tool -- run-migrations --mdir schema/ --ldir /tmp/ + git diff schema/ > schema.diff + line_count="$(wc -l schema.diff)" + if test $(line_count} > 0 ; then + echo "Schema diff" + cat schema.diff + exit 1 + fi