<commit_before>#
# Workflow: Build&Test PR for Hazelcast organization members
#
# Builds the code and run tests on a 2-dimension matrix of OS and frameworks, but
# only if the user is a member of the Hazelcast organization, as running the tests
# may end up running unsafe user code or expose secrets such as the enterprise key.
#
# Relies on build-and-test.yml workflow to do the actual building and testing of
# each OS and framework. Results are uploaded as artifacts and published as checks.
#
# Creates the 'Build&Test Result' check which is the check that GitHub requires
# (the PR cannot be merged until that check has completed successfully).
#

name: Build&Test PR
on: 

  # automatic on every pull request
  pull_request_target:

  # manual (for community PRs that we want to force-run here)  
  workflow_dispatch:
    inputs:

      # the PR number eg 712
      pr_number:
        description: Enter guest PR number to run test & coverage on it.
        required: true

      # the PR HEAD commit SHA which MUST have been verified
      pr_commit:
        description: Enter guest PR verified HEAD commit SHA.
        required: true

jobs:

  # test hazelcast membership
  test-membership:

    name: Test Hazelcast Membership
    runs-on: ubuntu-latest
    outputs:
      is-hazelcast: ${{ steps.test-membership.outputs.is-member }}

    steps:
      - name: Test
        id: test-membership
        uses: ./.github/actions/test-membership
        with:
          organization-name: hazelcast
          member-name: ${{ github.event.pull_request.head.repo.owner.login }}
          token: ${{ secrets.HAZELCAST_GITHUB_TOKEN_DEVOPS }}

  # ensure we are an Hazelcast organization member OR manually running
  ensure-membership:
    name: Ensure Membership
    runs-on: ubuntu-latest
    needs: test-membership
    if: needs.test-membership.outputs.is-hazelcast == 'true' || github.event_name == 'workflow_dispatch'

    steps:
      - name: Report
        shell: bash
        run: echo "User ${{ github.event.pull_request.head.repo.owner.login }} is a member of the Hazelcast organization"

  # get frameworks
  get-fwks:
    name: Get Frameworks
    uses: ./.github/workflows/get-frameworks.yml
    secrets: inherit<commit_msg>GitHub Workflows updates (for better coverage reports)<commit_after>#
# Workflow: Build&Test PR for Hazelcast organization members
#
# Builds the code and run tests on a 2-dimension matrix of OS and frameworks, but
# only if the user is a member of the Hazelcast organization, as running the tests
# may end up running unsafe user code or expose secrets such as the enterprise key.
#
# Relies on build-and-test.yml workflow to do the actual building and testing of
# each OS and framework. Results are uploaded as artifacts and published as checks.
#
# Creates the 'Build&Test Result' check which is the check that GitHub requires
# (the PR cannot be merged until that check has completed successfully).
#

name: Build&Test PR
on: 

  # automatic on every pull request
  pull_request_target:

  # manual (for community PRs that we want to force-run here)  
  workflow_dispatch:
    inputs:

      # the PR number eg 712
      pr_number:
        description: Enter guest PR number to run test & coverage on it.
        required: true

      # the PR HEAD commit SHA which MUST have been verified
      pr_commit:
        description: Enter guest PR verified HEAD commit SHA.
        required: true

jobs:

  # test hazelcast membership
  test-membership:

    name: Test Hazelcast Membership
    runs-on: ubuntu-latest
    outputs:
      is-hazelcast: ${{ steps.test-membership.outputs.is-member }}

    steps:
      - name: Test
        id: test-membership
        uses: ./.github/actions/test-membership
        with:
          organization-name: hazelcast
          member-name: ${{ github.event.pull_request.head.repo.owner.login }}
          token: ${{ secrets.HAZELCAST_GITHUB_TOKEN_DEVOPS }}

  # ensure we are an Hazelcast organization member OR manually running
  ensure-membership:
    name: Ensure Membership
    runs-on: ubuntu-latest
    needs: test-membership
    if: needs.test-membership.outputs.is-hazelcast == 'true' || github.event_name == 'workflow_dispatch'

    steps:
      - name: Report
        shell: bash
        run: echo "User ${{ github.event.pull_request.head.repo.owner.login }} is a member of the Hazelcast organization"

  # get frameworks
  get-fwks:
    name: Get Frameworks
    uses: ./.github/workflows/get-frameworks.yml
    needs: ensure-membership
    secrets: inherit
{'fraction_non_alphanumeric': 0.07479102507699076, 'fraction_numerical': 0.0017597888253409592, 'mean_word_length': 2.9746503496503496, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '3804380', 'n_tokens_mistral': 1337, 'n_tokens_neox': 1264, 'n_words': 489}