name: Integration Testing
on:
  push:
    branches:
      - 2021.x
  pull_request:
    branches:
      - 2021.x
jobs:
  deploy-docker-image:
    runs-on: ubuntu-latest
    timeout-minutes: 60
    steps:
      - name: Check out the repo
        uses: actions/checkout@v2

      - name: Set up QEMU
        uses: docker/setup-qemu-action@v1

      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v1

  integration-testing:
    name: Integration Testing
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Set up JDK 8
        uses: actions/setup-java@v2
        with:
          java-version: '8'
          distribution: 'adopt'
      - name: Dependies Cache
        uses: actions/cache@v2
        with:
          path: ~/.m2/repository
          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
          restore-keys: |
            ${{ runner.os }}-maven-
      - name: Compile & Checkstyle
        run: mvn clean compile
      - name: install dependencies
        run: mvn clean install -U package -pl '!spring-cloud-alibaba-coverage'  -DskipTests
      - name: Testing
        run: ./mvnw verify -B -Dmaven.test.skip=false
#        run: mvn clean -Dit.enabled=true test

