#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.
#

name: CI - Unit - Proxy
on:
  pull_request:
    branches:
      - master
  push:
    branches:
      - branch-*

env:
  MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3

jobs:

  unit-tests:
    name:
    runs-on: ubuntu-latest
    timeout-minutes: 120

    steps:
      - name: checkout
        uses: actions/checkout@v2

      - name: Tune Runner VM
        uses: ./.github/actions/tune-runner-vm

      - name: Detect changed files
        id:   changes
        uses: apache/pulsar-test-infra/paths-filter@master
        with:
          filters: .github/changes-filter.yaml

      - name: Check changed files
        id: check_changes
        run: echo "::set-output name=docs_only::${{ fromJSON(steps.changes.outputs.all_count) == fromJSON(steps.changes.outputs.docs_count) && fromJSON(steps.changes.outputs.docs_count) > 0 }}"

      - name: Cache local Maven repository
        if: ${{ steps.check_changes.outputs.docs_only != 'true' }}
        uses: actions/cache@v2
        with:
          path: |
            ~/.m2/repository/*/*/*
            !~/.m2/repository/org/apache/pulsar
          key: ${{ runner.os }}-m2-dependencies-core-modules-${{ hashFiles('**/pom.xml') }}
          restore-keys: |
            ${{ runner.os }}-m2-dependencies-core-modules-

      - name: Set up JDK 11
        uses: actions/setup-java@v2
        if: ${{ steps.check_changes.outputs.docs_only != 'true' }}
        with:
          distribution: 'temurin'
          java-version: 11

      - name: build modules pulsar-proxy
        if: ${{ steps.check_changes.outputs.docs_only != 'true' }}
        run: mvn -B -ntp -q install -Pcore-modules,-main -DskipTests

      - name: run unit test 'PROXY'
        if: ${{ steps.check_changes.outputs.docs_only != 'true' }}
        run: ./build/run_unit_group.sh PROXY

      - name: print JVM thread dumps when cancelled
        if: cancelled()
        run: ./build/pulsar_ci_tool.sh print_thread_dumps

      - name: package surefire artifacts
        if: failure()
        run: |
          rm -rf artifacts
          mkdir artifacts
          find . -type d -name "*surefire*" -exec cp --parents -R {} artifacts/ \;
          zip -r artifacts.zip artifacts

      - uses: actions/upload-artifact@master
        name: upload surefire-artifacts
        if: failure()
        with:
          name: surefire-artifacts
          path: artifacts.zip
