<commit_before># Tests PRs on multiple operating systems and Java versions

name: OptaPlanner CI

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master

defaults:
  run:
    shell: bash

jobs:
  os-java:
    name: OS x Java
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest]
        java-version: [11]
      fail-fast: false
    runs-on: ${{ matrix.os }}
    timeout-minutes: 120
    steps:
      - name: Disk space report before modification
        if: ${{ matrix.os == 'ubuntu-latest' }}
        shell: bash
        run: |
          echo "Available storage:"
          df -h
      # Inspired to maximize-build-space action https://github.com/easimon/maximize-build-space
      - name: Free disk space (remove dotnet, android and haskell)
        if: ${{ matrix.os == 'ubuntu-latest' }}
        shell: bash
        run: |
          sudo rm -rf /usr/share/dotnet
          sudo rm -rf /usr/local/lib/android
          sudo rm -rf /opt/ghc
      - name: Disk space report after modification
        if: ${{ matrix.os == 'ubuntu-latest' }}
        shell: bash
        run: |
          echo "Available storage:"
          df -h
      - name: Set up JDK
        uses: actions/setup-java@v1
        with:
          java-version: ${{ matrix.java-version }}
      # See https://docs.github.com/en/actions/guides/building-and-testing-java-with-maven#caching-dependencies
      - name: Cache Maven packages
        uses: actions/cache@v2
        with:
          path: ~/.m2
          key: ${{ runner.os }}-${{ matrix.java-version }}-m2-${{ hashFiles('**/pom.xml') }}
          restore-keys: ${{ runner.os }}-m2
      - name: Build Chain ${{ matrix.java-version }}
        id: build-chain
        uses: kiegroup/github-action-build-chain@v2.5.7
        with:
          definition-file: https://raw.githubusercontent.com/${GROUP}/kogito-pipelines/${BRANCH}/.ci/pull-request-config.yaml
          starting-project: kiegroup/optaplanner
      - name: Check Surefire Report
        if: ${{ always() }}
        uses: ScaCap/action-surefire-report@v1.0.10
        with:
          fail_on_test_failures: true
          fail_if_no_tests: false
          skip_publishing: true
          report_paths: '**/*-reports/TEST-*.xml'

  # Early feedback on a compatibility with the newest Java version.
  # TODO: update each time a new major Java version is released.
  latest-jdk:
    name: OpenJDK 16
    runs-on: ubuntu-latest
    timeout-minutes: 120
    steps:
      - name: Disk space report before modification
        shell: bash
        run: |
          echo "Available storage:"
          df -h
      # Inspired to maximize-build-space action https://github.com/easimon/maximize-build-space
      - name: Free disk space (remove dotnet, android and haskell)
        shell: bash
        run: |
          sudo rm -rf /usr/share/dotnet
          sudo rm -rf /usr/local/lib/android
          sudo rm -rf /opt/ghc
      - name: Disk space report after modification
        shell: bash
        run: |
          echo "Available storage:"
          df -h
      - name: Set up JDK
        uses: actions/setup-java@v1
        with:
          java-version: 16
      # See https://docs.github.com/en/actions/guides/building-and-testing-java-with-maven#caching-dependencies
      - name: Cache Maven packages
        uses: actions/cache@v2
        with:
          path: ~/.m2
          key: ${{ runner.os }}-16-m2-${{ hashFiles('**/pom.xml') }}
          restore-keys: ${{ runner.os }}-m2
      - name: Build Chain 16
        id: build-chain
        uses: kiegroup/github-action-build-chain@v2.5.7
        with:
          definition-file: https://raw.githubusercontent.com/${GROUP}/kogito-pipelines/${BRANCH}/.ci/pull-request-config.yaml
          starting-project: kiegroup/optaplanner
      - name: Check Surefire Report
        if: ${{ always() }}
        uses: ScaCap/action-surefire-report@v1.0.10
        with:
          fail_on_test_failures: true
          fail_if_no_tests: false
          skip_publishing: true
          report_paths: '**/*-reports/TEST-*.xml'<commit_msg>Fix/branch flow (#1365)<commit_after># Tests PRs on multiple operating systems and Java versions

name: OptaPlanner CI

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master

defaults:
  run:
    shell: bash

jobs:
  os-java:
    name: OS x Java
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest]
        java-version: [11]
      fail-fast: false
    runs-on: ${{ matrix.os }}
    timeout-minutes: 120
    steps:
      - name: Disk space report before modification
        if: ${{ matrix.os == 'ubuntu-latest' }}
        shell: bash
        run: |
          echo "Available storage:"
          df -h
      # Inspired to maximize-build-space action https://github.com/easimon/maximize-build-space
      - name: Free disk space (remove dotnet, android and haskell)
        if: ${{ matrix.os == 'ubuntu-latest' }}
        shell: bash
        run: |
          sudo rm -rf /usr/share/dotnet
          sudo rm -rf /usr/local/lib/android
          sudo rm -rf /opt/ghc
      - name: Disk space report after modification
        if: ${{ matrix.os == 'ubuntu-latest' }}
        shell: bash
        run: |
          echo "Available storage:"
          df -h
      - name: Set up JDK
        uses: actions/setup-java@v1
        with:
          java-version: ${{ matrix.java-version }}
      # See https://docs.github.com/en/actions/guides/building-and-testing-java-with-maven#caching-dependencies
      - name: Cache Maven packages
        uses: actions/cache@v2
        with:
          path: ~/.m2
          key: ${{ runner.os }}-${{ matrix.java-version }}-m2-${{ hashFiles('**/pom.xml') }}
          restore-keys: ${{ runner.os }}-m2
      - name: Set FLOW_TYPE to pull-request
        if: github.event_name == 'pull_request'
        run: echo "FLOW_TYPE=pull-request" >> $GITHUB_ENV
      - name: Set FLOW_TYPE to branch
        if: github.event_name == 'push'
        run: echo "FLOW_TYPE=branch" >> $GITHUB_ENV
      - name: Build Chain ${{ matrix.java-version }}
        id: build-chain
        uses: kiegroup/github-action-build-chain@v2.6.2
        with:
          definition-file: https://raw.githubusercontent.com/${GROUP}/kogito-pipelines/${BRANCH}/.ci/pull-request-config.yaml
          starting-project: kiegroup/optaplanner
          flow-type: ${{ env.FLOW_TYPE }}
      - name: Check Surefire Report
        if: ${{ always() }}
        uses: ScaCap/action-surefire-report@v1.0.10
        with:
          fail_on_test_failures: true
          fail_if_no_tests: false
          skip_publishing: true
          report_paths: '**/*-reports/TEST-*.xml'

  # Early feedback on a compatibility with the newest Java version.
  # TODO: update each time a new major Java version is released.
  latest-jdk:
    name: OpenJDK 16
    runs-on: ubuntu-latest
    timeout-minutes: 120
    steps:
      - name: Disk space report before modification
        shell: bash
        run: |
          echo "Available storage:"
          df -h
      # Inspired to maximize-build-space action https://github.com/easimon/maximize-build-space
      - name: Free disk space (remove dotnet, android and haskell)
        shell: bash
        run: |
          sudo rm -rf /usr/share/dotnet
          sudo rm -rf /usr/local/lib/android
          sudo rm -rf /opt/ghc
      - name: Disk space report after modification
        shell: bash
        run: |
          echo "Available storage:"
          df -h
      - name: Set up JDK
        uses: actions/setup-java@v1
        with:
          java-version: 16
      # See https://docs.github.com/en/actions/guides/building-and-testing-java-with-maven#caching-dependencies
      - name: Cache Maven packages
        uses: actions/cache@v2
        with:
          path: ~/.m2
          key: ${{ runner.os }}-16-m2-${{ hashFiles('**/pom.xml') }}
          restore-keys: ${{ runner.os }}-m2
      - name: Set FLOW_TYPE to pull-request
        if: github.event_name == 'pull_request'
        run: echo "FLOW_TYPE=pull-request" >> $GITHUB_ENV
      - name: Set FLOW_TYPE to branch
        if: github.event_name == 'push'
        run: echo "FLOW_TYPE=branch" >> $GITHUB_ENV
      - name: Build Chain 16
        id: build-chain
        uses: kiegroup/github-action-build-chain@v2.6.2
        with:
          definition-file: https://raw.githubusercontent.com/${GROUP}/kogito-pipelines/${BRANCH}/.ci/pull-request-config.yaml
          starting-project: kiegroup/optaplanner
          flow-type: ${{ env.FLOW_TYPE }}
      - name: Check Surefire Report
        if: ${{ always() }}
        uses: ScaCap/action-surefire-report@v1.0.10
        with:
          fail_on_test_failures: true
          fail_if_no_tests: false
          skip_publishing: true
          report_paths: '**/*-reports/TEST-*.xml'
{'fraction_non_alphanumeric': 0.12065854758682905, 'fraction_numerical': 0.009472259810554804, 'mean_word_length': 1.9328703703703705, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, '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': '5193900', 'n_tokens_mistral': 2871, 'n_tokens_neox': 2722, 'n_words': 677}