<commit_before>name: CakePHP CI

on:
  push:
    branches:
      - master
      - '4.next'
  pull_request:
    branches:
      - '*'

jobs:
  testsuite:
    runs-on: ubuntu-18.04
    strategy:
      fail-fast: false
      matrix:
        php-version: ['7.2', '7.4']
        db-type: [sqlite, mysql, pgsql]
    name: PHP ${{ matrix.php-version }} & ${{ matrix.db-type }}

    services:
      redis:
        image: redis
        ports:
          - 6379/tcp
      postgres:
        image: postgres
        ports:
          - 5432/tcp

    steps:
    - name: Setup mysql 8
      if: matrix.db-type == 'mysql'
      run: |
        sudo service mysql stop
        docker run --rm --name=mysqld -e MYSQL_ALLOW_EMPTY_PASSWORD=yes -e MYSQL_DATABASE=cakephp --network=host -d mysql --default-authentication-plugin=mysql_native_password --disable-log-bin

    - uses: actions/checkout@v1
      with:
        fetch-depth: 1

    - name: Setup PHP
      uses: shivammathur/setup-php@v1
      with:
        php-version: ${{ matrix.php-version }}
        extensions: mbstring, intl, apcu, pdo_${{ matrix.db-type }}
        ini-values: apc.enable_cli = 1
        coverage: pcov

    - name: Install packages
      run: |
        # memcached installation fails without updating packages.
        sudo apt update
        sudo apt install memcached
<commit_msg>Switch to O_DIRECT_NO_FSYNC to improve performance<commit_after>name: CakePHP CI

on:
  push:
    branches:
      - master
      - '4.next'
  pull_request:
    branches:
      - '*'

jobs:
  testsuite:
    runs-on: ubuntu-18.04
    strategy:
      fail-fast: false
      matrix:
        php-version: ['7.2', '7.4']
        db-type: [sqlite, mysql, pgsql]
    name: PHP ${{ matrix.php-version }} & ${{ matrix.db-type }}

    services:
      redis:
        image: redis
        ports:
          - 6379/tcp
      postgres:
        image: postgres
        ports:
          - 5432/tcp

    steps:
    - name: Setup mysql 8
      if: matrix.db-type == 'mysql'
      run: |
        sudo service mysql stop
        docker run --rm --name=mysqld -e MYSQL_ALLOW_EMPTY_PASSWORD=yes -e MYSQL_DATABASE=cakephp --network=host -d mysql --default-authentication-plugin=mysql_native_password --disable-log-bin --innodb-flush-method=O_DIRECT_NO_FSYNC

    - uses: actions/checkout@v1
      with:
        fetch-depth: 1

    - name: Setup PHP
      uses: shivammathur/setup-php@v1
      with:
        php-version: ${{ matrix.php-version }}
        extensions: mbstring, intl, apcu, pdo_${{ matrix.db-type }}
        ini-values: apc.enable_cli = 1
        coverage: pcov

    - name: Install packages
      run: |
        # memcached installation fails without updating packages.
        sudo apt update
        sudo apt install memcached

{'fraction_non_alphanumeric': 0.11119159724737414, 'fraction_numerical': 0.01593625498007968, 'mean_word_length': 1.9165786694825766, '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': '2848542', 'n_tokens_mistral': 954, 'n_tokens_neox': 904, 'n_words': 220}