name: master

on:
  push:
    branches:
    - master
  pull_request:
    branches:
    - master

jobs:
  build:

    runs-on: ubuntu-latest
    strategy:
      matrix:
        java: [ '1.8', '11' ]
    name: Build Spark with JDK ${{ matrix.java }}

    steps:
    - uses: actions/checkout@master
    - name: Set up JDK ${{ matrix.java }}
      uses: actions/setup-java@v1
      with:
        version: ${{ matrix.java }}
    - name: Build with Maven
      run: |
        export MAVEN_OPTS="-Xmx2g -XX:ReservedCodeCacheSize=512m -Dorg.slf4j.simpleLogger.defaultLogLevel=WARN"
        export MAVEN_CLI_OPTS="--no-transfer-progress"
        ./build/mvn $MAVEN_CLI_OPTS -DskipTests -Pyarn -Pmesos -Pkubernetes -Phive -Phive-thriftserver -Phadoop-3.2 -Phadoop-cloud -Djava.version=${{ matrix.java }} package

name: master

on:
  push:
    branches:
    - master
  pull_request:
    branches:
    - master

jobs:
  build:

    runs-on: ubuntu-latest
    strategy:
      matrix:
        java: [ '1.8', '11' ]
        hadoop: [ 'hadoop-2.7', 'hadoop-3.2' ]
        exclude:
        - java: '11'
          hadoop: 'hadoop-2.7'
    name: Build Spark with JDK ${{ matrix.java }} and ${{ matrix.hadoop }}

    steps:
    - uses: actions/checkout@master
    - name: Set up JDK ${{ matrix.java }}
      uses: actions/setup-java@v1
      with:
        version: ${{ matrix.java }}
    - name: Build with Maven
      run: |
        export MAVEN_OPTS="-Xmx2g -XX:ReservedCodeCacheSize=512m -Dorg.slf4j.simpleLogger.defaultLogLevel=WARN"
        export MAVEN_CLI_OPTS="--no-transfer-progress"
        ./build/mvn $MAVEN_CLI_OPTS -DskipTests -Pyarn -Pmesos -Pkubernetes -Phive -Phive-thriftserver -P${{ matrix.hadoop }} -Phadoop-cloud -Djava.version=${{ matrix.java }} package

Add Hadoop 2.7 combination to GitHub Action
[SPARK-29125][INFRA] Add Hadoop 2.7 combination to GitHub Action

### What changes were proposed in this pull request?

Until now, we are testing JDK8/11 with Hadoop-3.2. This PR aims to extend the test coverage for JDK8/Hadoop-2.7.

### Why are the changes needed?

This will prevent Hadoop 2.7 compile/package issues at PR stage.

### Does this PR introduce any user-facing change?

No.

### How was this patch tested?

GitHub Action on this PR shows all three combinations now. And, this is irrelevant to Jenkins test.

Closes #25824 from dongjoon-hyun/SPARK-29125.

Authored-by: Dongjoon Hyun <9b02cb7e37158797a8e22c559f7c5f5ecd28ea57@apple.com>
Signed-off-by: Dongjoon Hyun <9b02cb7e37158797a8e22c559f7c5f5ecd28ea57@apple.com>
