<commit_before>name: Java CI
on:
  push:
    branches:
    - master
    - release/*
  pull_request:
    branches:
    - master
    - release/*
jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        java_version: ['8', '11', '17']
        os: ['ubuntu-latest', 'windows-latest']
    env:
      JAVA_OPTS: "-XX:+TieredCompilation -XX:TieredStopAtLevel=1"
    steps:
    - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3.0.2
      with:
        fetch-depth: 0  # Shallow clones should be disabled for a better relevancy of analysis
    - name: Set up JDK
      uses: actions/setup-java@a18c333f3f14249953dab3e186e5e21bf3390f1d # tag=v3
      with:
        distribution: 'temurin'
        java-version: ${{ matrix.java_version }}
    - name: Cache SonarCloud packages
      uses: actions/cache@ac8075791e805656e71b4ba23325ace9e3421120 # tag=v3.0.9
      if: ${{ env.SONAR_TOKEN != null && env.SONAR_TOKEN != '' && matrix.java_version == '11' }}
      env:
        SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
      with:
        path: ~/.sonar/cache
        key: ${{ runner.os }}-sonar
        restore-keys: ${{ runner.os }}-sonar
    - name: Build
      run: ./mvnw --no-transfer-progress -V -B -ff -s .github/settings.xml -e "-DtrimStackTrace=false" "-Dmaven.test.failure.ignore=true" "-Dsurefire.rerunFailingTestsCount=1" install
    - name: Publish Test Results
      # If the CI run is not initiated from the primary repository, it is highly likely that this is a PR from a user who doesn't have commit rights.
      # Hence, skip this step to avoid permission failures.
      if: github.event.pull_request.head.repo.full_name == 'dropwizard/dropwizard'
      uses: scacap/action-surefire-report@482f012643ed0560e23ef605a79e8e87ca081648 # tag=v1
      with:
        github_token: ${{ secrets.GITHUB_TOKEN }}
        check_name: Test Report (${{ matrix.os }} - Java ${{ matrix.java_version }})
        report_paths: '**/*-reports/TEST-*.xml'
    - name: Upload Test Reports
      # If the CI run is not initiated from the primary repository, it is highly likely that this is a PR from a user who doesn't have commit rights.
      # Hence, skip this step to avoid permission failures.
      if: github.event.pull_request.head.repo.full_name == 'dropwizard/dropwizard'
      uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # tag=v3
      with:
        name: test-reports-${{ matrix.os }}-java${{ matrix.java_version }}
        path: '**/*-reports'
    - name: Analyze with SonarCloud
      if: ${{ env.SONAR_TOKEN != null && env.SONAR_TOKEN != '' && matrix.java_version == '11' }}
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}  # Needed to get PR information, if any
        SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
      run: ./mvnw --no-transfer-progress -V -B -ff -s .github/settings.xml "-Dsonar.projectKey=dropwizard_dropwizard" "-Dsonar.organization=dropwizard" "-Dsonar.host.url=https://sonarcloud.io" org.sonarsource.scanner.maven:sonar-maven-plugin:sonar<commit_msg>Skip SonarScanner on Windows runners (#5940)<commit_after>name: Java CI
on:
  push:
    branches:
    - master
    - release/*
  pull_request:
    branches:
    - master
    - release/*
jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        java_version: ['8', '11', '17']
        os: ['ubuntu-latest', 'windows-latest']
    env:
      JAVA_OPTS: "-XX:+TieredCompilation -XX:TieredStopAtLevel=1"
    steps:
    - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3.0.2
      with:
        fetch-depth: 0  # Shallow clones should be disabled for a better relevancy of analysis
    - name: Set up JDK
      uses: actions/setup-java@a18c333f3f14249953dab3e186e5e21bf3390f1d # tag=v3
      with:
        distribution: 'temurin'
        java-version: ${{ matrix.java_version }}
    - name: Cache SonarCloud packages
      uses: actions/cache@ac8075791e805656e71b4ba23325ace9e3421120 # tag=v3.0.9
      if: ${{ env.SONAR_TOKEN != null && env.SONAR_TOKEN != '' && matrix.java_version == '11'  && matrix.os == 'ubuntu-latest' }}
      env:
        SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
      with:
        path: ~/.sonar/cache
        key: ${{ runner.os }}-sonar
        restore-keys: ${{ runner.os }}-sonar
    - name: Build
      run: ./mvnw --no-transfer-progress -V -B -ff -s .github/settings.xml -e "-DtrimStackTrace=false" "-Dmaven.test.failure.ignore=true" "-Dsurefire.rerunFailingTestsCount=1" install
    - name: Publish Test Results
      # If the CI run is not initiated from the primary repository, it is highly likely that this is a PR from a user who doesn't have commit rights.
      # Hence, skip this step to avoid permission failures.
      if: github.event.pull_request.head.repo.full_name == 'dropwizard/dropwizard'
      uses: scacap/action-surefire-report@482f012643ed0560e23ef605a79e8e87ca081648 # tag=v1
      with:
        github_token: ${{ secrets.GITHUB_TOKEN }}
        check_name: Test Report (${{ matrix.os }} - Java ${{ matrix.java_version }})
        report_paths: '**/*-reports/TEST-*.xml'
    - name: Upload Test Reports
      # If the CI run is not initiated from the primary repository, it is highly likely that this is a PR from a user who doesn't have commit rights.
      # Hence, skip this step to avoid permission failures.
      if: github.event.pull_request.head.repo.full_name == 'dropwizard/dropwizard'
      uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # tag=v3
      with:
        name: test-reports-${{ matrix.os }}-java${{ matrix.java_version }}
        path: '**/*-reports'
    - name: Analyze with SonarCloud
      if: ${{ env.SONAR_TOKEN != null && env.SONAR_TOKEN != '' && matrix.java_version == '11' && matrix.os == 'ubuntu-latest' }}
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}  # Needed to get PR information, if any
        SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
      run: ./mvnw --no-transfer-progress -V -B -ff -s .github/settings.xml "-Dsonar.projectKey=dropwizard_dropwizard" "-Dsonar.organization=dropwizard" "-Dsonar.host.url=https://sonarcloud.io" org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
{'fraction_non_alphanumeric': 0.1271186440677966, 'fraction_numerical': 0.05276622961304765, 'mean_word_length': 2.926553672316384, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1751899', 'n_tokens_mistral': 2337, 'n_tokens_neox': 2123, 'n_words': 500}