<commit_before>name: Test

on:
  pull_request:
    branches:
      - master
  workflow_dispatch:
  workflow_call:

jobs:
  unit:
    strategy:
      matrix:
        php-version: ['8.0', '7.4', '5.6']
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php-version }}
          tools: composer

      - name: Validate composer.json
        run: composer validate --strict

      - run: composer install

      - run: composer run phpunit

  behat:
    strategy:
      matrix:
        php-version: ['8.0', '7.4', '5.6']
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php-version }}
          tools: composer

      - name: Setup MySQL
        run: |
          sudo systemctl start mysql.service
          mysql -e 'CREATE DATABASE wp_cli_test;' -uroot -proot
          mysql -e 'GRANT ALL PRIVILEGES ON wp_cli_test.* TO "wp_cli_test"@"localhost" IDENTIFIED BY "<PASSWORD>";' -uroot -proot

      - run: composer install

      - run: composer run behat

<commit_msg>update mysql commands<commit_after>name: Test

on:
  pull_request:
    branches:
      - master
  workflow_dispatch:
  workflow_call:

jobs:
  unit:
    strategy:
      matrix:
        php-version: ['8.0', '7.4', '5.6']
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php-version }}
          tools: composer

      - name: Validate composer.json
        run: composer validate --strict

      - run: composer install

      - run: composer run phpunit

  behat:
    strategy:
      matrix:
        php-version: ['8.0', '7.4', '5.6']
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php-version }}
          tools: composer

      - name: Setup MySQL
        run: |
          sudo systemctl start mysql.service
          mysql -e 'CREATE DATABASE wp_cli_test;' -uroot -proot
          mysql -e 'CREATE USER "wp_cli_test"@"localhost" IDENTIFIED BY "<PASSWORD>";' -uroot -proot
          mysql -e 'GRANT ALL PRIVILEGES ON wp_cli_test.* TO "wp_cli_test"@"localhost";' -uroot -proot

      - run: composer install

      - run: composer run behat


{'fraction_non_alphanumeric': 0.11324451410658307, 'fraction_numerical': 0.012539184952978056, 'mean_word_length': 1.911060433295325, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '209269', 'n_tokens_mistral': 876, 'n_tokens_neox': 833, 'n_words': 215}