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:
        java-version: ${{ matrix.java }}
    - name: Build with Maven
      run: |
        export MAVEN_OPTS="-Xmx2g -XX:ReservedCodeCacheSize=1g -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

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:
        java-version: ${{ matrix.java }}
    - name: Build with Maven
      run: |
        export MAVEN_OPTS="-Xmx2g -XX:ReservedCodeCacheSize=1g -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


  lint:
    runs-on: ubuntu-latest
    name: Linters
    steps:
    - uses: actions/checkout@master
    - uses: actions/setup-java@v1
      with:
        java-version: '11'
    - uses: actions/setup-python@v1
      with:
        python-version: '3.x'
        architecture: 'x64'
    - name: Scala
      run: ./dev/lint-scala
    - name: Java
      run: ./dev/lint-java
    - name: Python
      run: |
        pip install flake8 sphinx numpy
        ./dev/lint-python
    - name: License
      run: ./dev/check-license
    - name: Dependencies
      run: ./dev/test-dependencies.sh

Add linters and license/dependency checkers to GitHub Action
[SPARK-29199][INFRA] Add linters and license/dependency checkers to GitHub Action

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

This PR aims to add linters and license/dependency checkers to GitHub Action. This excludes `lint-r` intentionally because https://github.com/actions/setup-r is not ready. We can add that later when it becomes available.

### Why are the changes needed?

This will help the PR reviews.

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

No.

### How was this patch tested?

See the GitHub Action result on this PR.

Closes #25879 from dongjoon-hyun/SPARK-29199.

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