name: "[ubuntu-18.04] PostgreSQL 12 and PostGIS 2.5"

on:
  push:
    branches:
      - master
  pull_request:

jobs:
  build:
    name: Building and testing
    runs-on: ubuntu-18.04
    steps:
      - name: Check out repository code
        uses: actions/checkout@v2
      - name: Install PostgreSQL and PostGIS
        env:
          POSTGRESQL_VERSION: 12
          POSTGIS_VERSION: 2.5
        run: .github/scripts/postgresql_postgis.sh
      - name: Install and check PgPointCloud
        run: .github/scripts/pgpointcloud.sh
      - name: Error
        if: ${{ failure() }}
        run: cat pgsql/regression.diffs
      - name: Dump and restore tests
        run: .github/scripts/test_dump_restore.sh
