name: CI
on: 
  push:
    paths-ignore:
      - '*.md'
      - '*.json'
      - 'examples/*'
      - 'scripts/**'
  pull_request:
    paths-ignore:
      - '*.md'
      - '*.json'
      - 'examples/*'
      - 'scripts/**'
jobs:
  test:
    strategy:
      matrix:
        pg: [19,18,17,16,15,14,13,12,11,10,9.6,9.5]
    name: 🐘 PostgreSQL ${{ matrix.pg }}
    runs-on: ubuntu-latest
    container: pgxn/pgxn-tools
    steps:
      - name: Prepare environment 
        run: sudo apt-get update && sudo apt-get install -y make gcc libxml2-dev libcurl4-gnutls-dev pkg-config
      - name: Start PostgreSQL ${{ matrix.pg }}
        run: pg-start ${{ matrix.pg }}
      - uses: actions/checkout@v2
      - name: Build and Regression Tests
        run: |
          export SKIP_UPDATE_TESTS=1
          export SKIP_STRESS_TESTS=1
          export SKIP_EXTERNAL_TESTS=1
          pg-build-test
