name: run_tests

on:
  push:
    branches:
      - main
  pull_request:
jobs:
  run_tests:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        pg_package: ["postgresql14", "postgresql15"]
    steps:
      - name: Checkout code
        uses: actions/checkout@v3
      - name: Build Docker image
        run: docker build -t pg-schema-diff-test-runner -f ./build/Dockerfile.test --build-arg POSTGRES_PACKAGE=${{ matrix.pg_package }} .
      - name: Run tests
        run: docker run pg-schema-diff-test-runner
