<commit_before>name: build

on: [push, pull_request]

env:
  DEFAULT_COMPOSER_FLAGS: "--prefer-dist --no-interaction --no-progress --optimize-autoloader"
  PHPUNIT_EXCLUDE_GROUP: mssql,oci,wincache,xcache,zenddata,cubrid

jobs:
  phpunit:
    name: PHP ${{ matrix.php }} on ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    services:
      mysql:
        image: mysql:5.7
        env:
          MYSQL_ROOT_PASSWORD: root
          MYSQL_DATABASE: yiitest
        ports:
          - 3306:3306
        options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
      postgres:
        image: postgres:9.6
        env:
          POSTGRES_USER: postgres
          POSTGRES_PASSWORD: <PASSWORD>
          POSTGRES_DB: yiitest
        ports:
          - 5432:5432
        options: --name=postgres --health-cmd="pg_isready" --health-interval=10s --health-timeout=5s --health-retries=3
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest]
        php: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4']

    steps:
      - name: Generate french locale
        run: sudo locale-gen fr_FR.UTF-8
      - name: Checkout
        uses: actions/checkout@v2
      - name: Install PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php }}
          extensions: apc, curl, dom, imagick, intl, mbstring, mcrypt, memcached, mysql, pdo, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, sqlite
          ini-values: date.timezone='UTC'
      - name: Install Memcached
        uses: niden/actions-memcached@v7
      - name: Get composer cache directory
        id: composer-cache<commit_msg>Run tests against MSSQL in CI (#18155)<commit_after>name: build

on: [push, pull_request]

env:
  DEFAULT_COMPOSER_FLAGS: "--prefer-dist --no-interaction --no-progress --optimize-autoloader"
  PHPUNIT_EXCLUDE_GROUP: mssql,oci,wincache,xcache,zenddata,cubrid

jobs:
  phpunit:
    name: PHP ${{ matrix.php }} on ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    services:
      mysql:
        image: mysql:5.7
        env:
          MYSQL_ROOT_PASSWORD: <PASSWORD>
          MYSQL_DATABASE: yiitest
        ports:
          - 3306:3306
        options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
      postgres:
        image: postgres:9.6
        env:
          POSTGRES_USER: postgres
          POSTGRES_PASSWORD: <PASSWORD>
          POSTGRES_DB: yiitest
        ports:
          - 5432:5432
        options: --name=postgres --health-cmd="pg_isready" --health-interval=10s --health-timeout=5s --health-retries=3
      mssql:
          image: mcr.microsoft.com/mssql/server:2017-latest
          env:
              SA_PASSWORD: <PASSWORD>
              ACCEPT_EULA: Y
              MSSQL_PID: Developer
          ports:
              - 1433:1433
          options: --name=mssql --health-cmd="/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P '<PASSWORD>' -Q 'SELECT 1'" --health-interval=10s --health-timeout=5s --health-retries=3
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest]
        php: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4']

    steps:
      - name: Generate french locale
        run: sudo locale-gen fr_FR.UTF-8
      - name: Create MS SQL Database
        run: docker exec -i mssql /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P '<PASSWORD>' -Q 'CREATE DATABASE yiitest'
      - name: Checkout
        uses: actions/checkout@v2
      - name: Install PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php }}
          tools: pecl
          extensions: apc, curl, dom, imagick, intl, mbstring, mcrypt, memcached, mysql, pdo, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, sqlite
          ini-values: date.timezone='UTC'
      - name: Install php-sqlsrv
        run: |
            curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - >/dev/null 2>&1
            curl -sSL https://packages.microsoft.com/config/ubuntu/16.04/mssql-server-2017.list | sudo tee /etc/apt/sources.list.d/mssql-server-2017.list >/dev/null 2>&1
            printf "\033[32;1m✓ \033[0m\033[90;1madd microsoft keys & repository\n"
            sudo apt-get -q update >/dev/null 2>&1
            printf "\033[32;1m✓ \033[0m\033[90;1mapt-get update\n"
            sudo pecl -q install pdo_sqlsrv > /dev/null 2>&1
            printf "\033[32;1m✓ \033[0m\033[90;1mpecl install pdo_sqlsrv\n"
            if (php -m | grep -i -q -w "pdo_sqlsrv"); then
                printf "\033[32;1mpdo_sqlsrv installed correct\n"
            else
                printf "\033[31;1mpdo_sqlsrv not installed :-(\n"
            fi
        if: matrix.php == '7.4' || matrix.php == '7.3' || matrix.php == '7.2'
      - name: Install Memcached
        uses: niden/actions-memcached@v7
      - name: Get composer cache directory
        id: composer-cache
{'fraction_non_alphanumeric': 0.13426206339592167, 'fraction_numerical': 0.04118715929739552, 'mean_word_length': 2.0846824408468243, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 17, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2854741', 'n_tokens_mistral': 1869, 'n_tokens_neox': 1733, 'n_words': 376}