# Ignoring version of the corresponding workflow. These files are
# needed to run required workflows even when the real workflow is not
# executed because some files were ignored.
name: Regression
"on":
  push:
    branches:
      - main
    paths:
      - '!**'
      - '**.md'
      - 'LICENSE*'
      - NOTICE
  pull_request:
    paths:
      - '!**'
      - '**.md'
      - 'LICENSE*'
      - NOTICE
jobs:
  matrixbuilder:
    runs-on: ubuntu-latest
    outputs:
      matrix: ${{ steps.set-matrix.outputs.matrix }}
    steps:
    - name: Checkout source code
      uses: actions/checkout@v4

    - name: Build matrix
      id: set-matrix
      run: |
        if [[ "${{ github.event_name }}" == "pull_request" ]] ;
        then
          git fetch origin ${{ github.base_ref }}:base
          .github/gh_matrix_builder.py ${{ github.event_name }} base
        else
          .github/gh_matrix_builder.py ${{ github.event_name }}
        fi

  regress:
    name: PG${{ matrix.pg }}${{ matrix.snapshot }} ${{ matrix.name }} ${{ matrix.os }}
    needs: matrixbuilder
    runs-on: ubuntu-latest
    strategy:
      matrix: ${{ fromJson(needs.matrixbuilder.outputs.matrix) }}
    steps:
      - run: |
          echo "No build required"
