---
name: CrateDB SQL
on: [push]

jobs:
  test:
    name: Test CrateDB SQL on ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest]
    steps:
      - uses: actions/checkout@v2
      - name: Setup Gradle Java
        uses: actions/setup-java@v1
        with:
          java-version: 11

      - name: Run tests on ${{ matrix.os }}
        uses: eskatos/gradle-command-action@v1
        with:
          arguments: :server:test -Dtests.crate.run-windows-incompatible=${{ matrix.os == 'ubuntu-latest' }}

---
name: CrateDB SQL
on:
  pull_request: ~
  push:
    branches:
      - master

jobs:
  test:
    name: Test CrateDB SQL on ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest]
    steps:
      - uses: actions/checkout@v2
      - name: Setup Gradle Java
        uses: actions/setup-java@v1
        with:
          java-version: 11

      - name: Run tests on ${{ matrix.os }}
        uses: eskatos/gradle-command-action@v1
        with:
          arguments: :server:test -Dtests.crate.run-windows-incompatible=${{ matrix.os == 'ubuntu-latest' }}

Change GH-action trigger to work on PRs from forks
Change GH-action trigger to work on PRs from forks
