<commit_before>name: CI build
on: [ push, pull_request ]
jobs:
    build:
        name: PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }} ${{ matrix.extra-label }} ${{ matrix.composer-dependencies }}
        runs-on: ${{ matrix.operating-system }}
        strategy:
            fail-fast: false
            matrix:
                operating-system: [ ubuntu-latest ]
                php-versions: [ '7.4', '8.0', '8.1' ]
                composer-dependencies: [ '', '--prefer-lowest' ]
                composer-version: [ 'v1' ]
                extra-label: [ '' ]
                include:

                    # Composer v2
                    -   php-versions: '7.4'
                        operating-system: ubuntu-latest
                        composer-version: 'v2'
                        extra-label: 'Composer v2'

                    # Windows
                    -   php-versions: '7.4'
                        operating-system: windows-latest
                        coverage: xdebug

        steps:
            # see https://github.com/actions/checkout/issues/226#issue-606867805
            -   name: Prepare git
                run: git config --global core.autocrlf false

            -   name: Checkout
                uses: actions/checkout@v2

            -   name: Setup PHP, with composer and extensions
                uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
                with:
                    php-version: ${{ matrix.php-versions }}
                    ini-values: memory_limit=-1
                    tools: composer:${{ matrix.composer-version }}
                    coverage: ${{ matrix.coverage }}

            -   name: Get composer cache directory
                id: composer-cache
                run: echo "::set-output name=dir::$(composer config cache-files-dir)"

            -   name: Cache dependencies
                uses: actions/cache@v2
                with:
                    path: ${{ steps.composer-cache.outputs.dir }}
                    key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
                    restore-keys: ${{ runner.os }}-composer-

            -   name: Install Composer dependencies
                run: composer update --no-progress --prefer-dist --optimize-autoloader ${{ matrix.composer-dependencies }}

            -   name: Run CI Build
                run: composer ci

            - name: Upload coverage results to Coveralls
              env:
                  COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
              run: |
                  composer global require php-coveralls/php-coveralls
                  php-coveralls --coverage_clover=build/logs/clover.xml -v<commit_msg>build only with Composer v2<commit_after>name: CI build
on: [ push, pull_request ]
jobs:
    build:
        name: PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }} ${{ matrix.extra-label }} ${{ matrix.composer-dependencies }}
        runs-on: ${{ matrix.operating-system }}
        strategy:
            fail-fast: false
            matrix:
                operating-system: [ ubuntu-latest ]
                php-versions: [ '7.4', '8.0', '8.1' ]
                composer-dependencies: [ '', '--prefer-lowest' ]
                extra-label: [ '' ]
                include:

                    # Windows
                    -   php-versions: '7.4'
                        operating-system: windows-latest
                        coverage: xdebug

                    # Windows
                    -   php-versions: '8.0'
                        operating-system: windows-latest
                        coverage: xdebug

                    # Windows
                    -   php-versions: '8.1'
                        operating-system: windows-latest
                        coverage: xdebug

        steps:
            # see https://github.com/actions/checkout/issues/226#issue-606867805
            -   name: Prepare git
                run: git config --global core.autocrlf false

            -   name: Checkout
                uses: actions/checkout@v2

            -   name: Setup PHP, with composer and extensions
                uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
                with:
                    php-version: ${{ matrix.php-versions }}
                    ini-values: memory_limit=-1
                    tools: composer:v2
                    coverage: ${{ matrix.coverage }}

            -   name: Get composer cache directory
                id: composer-cache
                run: echo "::set-output name=dir::$(composer config cache-files-dir)"

            -   name: Cache dependencies
                uses: actions/cache@v2
                with:
                    path: ${{ steps.composer-cache.outputs.dir }}
                    key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
                    restore-keys: ${{ runner.os }}-composer-

            -   name: Install Composer dependencies
                run: composer update --no-progress --prefer-dist --optimize-autoloader ${{ matrix.composer-dependencies }}

            -   name: Run CI Build
                run: composer ci

            - name: Upload coverage results to Coveralls
              env:
                  COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
              run: |
                  composer global require php-coveralls/php-coveralls
                  php-coveralls --coverage_clover=build/logs/clover.xml -v
{'fraction_non_alphanumeric': 0.10860137332851463, 'fraction_numerical': 0.01084206722081677, 'mean_word_length': 1.2787155207904488, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '6783500', 'n_tokens_mistral': 1519, 'n_tokens_neox': 1378, 'n_words': 303}