name: "[ubuntu-20.04] PostgreSQL 12 and PostGIS 3.2"

on:
  push:
    branches:
      - master
  pull_request:

jobs:
  build:
    name: Building and testing
    runs-on: ubuntu-20.04
    steps:
      - name: Check out repository code
        uses: actions/checkout@v2
      - name: Install PostgreSQL and PostGIS
        env:
          POSTGRESQL_VERSION: 12
          POSTGIS_VERSION: 3
        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
