on: [pull_request]

jobs:
  rosetta-tests:
    name: Rosetta Tests
    runs-on: ubuntu-latest
    strategy:
      matrix:
        # test against latest 8, 11, 14 of zulu and temurin java
        java-version: [ 8, 11, 14 ]
        java-vendor: [ 'zulu', 'temurin' ]
    steps:
      - uses: actions/checkout@v2
      - name: Build and test with Gradle (${{ matrix.java-vendor }} ${{ matrix.java-version }})
        uses: Unidata/thredds-test-action@v1
        with:
          java-vendor: ${{ matrix.java-vendor }}
          java-version: ${{ matrix.java-version }}
          build-tool: 'gradlew'
          test-command: '--info --stacktrace clean test integrationTests'
      - uses: actions/upload-artifact@v2
        if: failure()
        with:
          name: Rosetta_JUnit_Results_${{ github.sha }}_${{ matrix.java-vendor }}-${{ matrix.java-version }}
          path: build/reports/allTests

on: [pull_request]

jobs:
  rosetta-tests:
    name: Rosetta Tests
    runs-on: ubuntu-latest
    strategy:
      matrix:
        # test against latest 8, 11, and 14 of zulu, and 8 and 11 of temurin java
        java-version: [ 8, 11 ]
        java-vendor: [ 'zulu', 'temurin' ]
        include:
          - java-version: 14
            java-vendor: 'zulu'
    steps:
      - uses: actions/checkout@v2
      - name: Build and test with Gradle (${{ matrix.java-vendor }} ${{ matrix.java-version }})
        uses: Unidata/thredds-test-action@v1
        with:
          java-vendor: ${{ matrix.java-vendor }}
          java-version: ${{ matrix.java-version }}
          build-tool: 'gradlew'
          test-command: '--info --stacktrace clean test integrationTests'
      - uses: actions/upload-artifact@v2
        if: failure()
        with:
          name: Rosetta_JUnit_Results_${{ github.sha }}_${{ matrix.java-vendor }}-${{ matrix.java-version }}
          path: build/reports/allTests

Test against latest 8, 11, and 14 of zulu, and 8 and 11 of temurin java
Test against latest 8, 11, and 14 of zulu, and 8 and 11 of temurin java
