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

name: Java CI with Gradle

on:
  push:
    branches: [ DEV-1235 ]
  pull_request:
    branches: [ DEV-1235 ]

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - name: Set up JDK 11
      uses: actions/setup-java@v2
      with:
        java-version: '11'
        distribution: 'adopt'
    - name: Remove existing build cache
      run: rm -f  $HOME/.gradle/caches/modules-2/modules-2.lock ; rm -fr $HOME/.gradle/caches/*/plugin-resoluti
    - name: Grant execute permission for gradlew
      run: chmod +x gradlew
    - name: Install with Gradle
      run: ./gradlew --stacktrace printInfo
    - name: Build with Gradle
      run: ./gradlew --continue --stacktrace --profile build
    - name: SonarCloud Scan
      uses: sonarsource/sonarcloud-github-action@master
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
    - name: Run some code test
      run: ./gradlew --stacktrace -Djdk.tls.client.protocols="TLSv1,TLSv1.1,TLSv1.2" sonarqube jacocoTestReport coveralls

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

name: Java CI with Gradle

on:
  push:
    branches: [ DEV-1235 ]
  pull_request:
    branches: [ DEV-1235 ]

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - name: Set up JDK 11
      uses: actions/setup-java@v2
      with:
        java-version: '11'
        distribution: 'adopt'
    - name: Remove existing build cache
      run: rm -f  $HOME/.gradle/caches/modules-2/modules-2.lock ; rm -fr $HOME/.gradle/caches/*/plugin-resoluti
    - name: Grant execute permission for gradlew
      run: chmod +x gradlew
    - name: Install with Gradle
      run: ./gradlew --stacktrace printInfo
    - name: Build with Gradle
      run: ./gradlew --continue --stacktrace --profile build
    - name: SonarCloud Scan
      uses: sonarsource/sonarcloud-github-action@master
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        SONAR_TOKEN: ab81ec76bcb0de28a933bf908ccca2562b33df83
    - name: Run some code test
      run: ./gradlew --stacktrace -Djdk.tls.client.protocols="TLSv1,TLSv1.1,TLSv1.2" jacocoTestReport coveralls

Fix github actions due to sonarqube token auth.
Fix github actions due to sonarqube token auth.
