# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Java CI with Maven

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - name: Set up JDK 1.8
      uses: actions/setup-java@v1
      with:
        java-version: 1.8
    - name: Build with Maven
      run: mvn -B package --file pom.xml

# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Java CI with Maven

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - name: Set up JDK 1.8
        uses: actions/setup-java@v1
        with:
          java-version: 1.8
      - name: Build with Maven
        run: mvn --show-version verify sonar:sonar --file pom.xml -Dsonar.organization=cloudbees -Dsonar.host.url=${SONAR_URL} -Dsonar.login=${SONAR_TOKEN} -Pcoverage
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
          SONAR_URL: ${{ secrets.SONAR_URL }}
          ZENDESK_JAVA_CLIENT_TEST_URL: ${{ secrets.ZENDESK_JAVA_CLIENT_TEST_URL }}
          ZENDESK_JAVA_CLIENT_TEST_USERNAME: ${{ secrets.ZENDESK_JAVA_CLIENT_TEST_USERNAME }}
          ZENDESK_JAVA_CLIENT_TEST_PASSWORD: ${{ secrets.ZENDESK_JAVA_CLIENT_TEST_PASSWORD }}
          ZENDESK_JAVA_CLIENT_TEST_TOKEN: ${{ secrets.ZENDESK_JAVA_CLIENT_TEST_TOKEN }}
          ZENDESK_JAVA_CLIENT_TEST_REQUESTER_EMAIL: ${{ secrets.ZENDESK_JAVA_CLIENT_TEST_REQUESTER_EMAIL }}
          ZENDESK_JAVA_CLIENT_TEST_REQUESTER_NAME: ${{ secrets.ZENDESK_JAVA_CLIENT_TEST_REQUESTER_NAME }}

Configure integration tests and SonarCloud
[chore] Configure integration tests and SonarCloud