<commit_before>name: CI
on: [push, pull_request]
jobs:
    lint:
        name: Lint
        timeout-minutes: 5
        runs-on: ubuntu-latest
        steps:
            -   name: Checkout
                uses: actions/checkout@v3
            -   name: Setup PHP
                uses: shivammathur/setup-php@v2
                with:
                    php-version: ${{ matrix.php-version }}
            -   name: Composer Install
                run: composer install --classmap-authoritative --no-interaction --no-cache
            -   name: Lint
                run: vendor/bin/parallel-lint --show-deprecated build phpseclib tests
        strategy:
            fail-fast: false
            matrix:
                php-version: ['8.1', '8.2']
    quality_tools:
        name: Quality Tools
        timeout-minutes: 5
        runs-on: ubuntu-latest
        steps:
            -   name: Checkout
                uses: actions/checkout@v3
            -   name: Setup PHP
                uses: shivammathur/setup-php@v2
                with:
                    php-version: '8.1'
            -   name: Composer Install
                run: composer install --classmap-authoritative --no-interaction --no-cache
            -   name: PHP_CodeSniffer
                run: vendor/bin/phpcs --standard=build/php_codesniffer.xml
            -   name: PHP CS Fixer
                run: vendor/bin/php-cs-fixer fix --config=build/php-cs-fixer.php --diff --dry-run --using-cache=no
            -   name: Psalm
                run: vendor/bin/psalm --config=build/psalm.xml --no-cache --long-progress --report-show-info=false
        strategy:
            fail-fast: false
    tests:
        name: Tests
        timeout-minutes: 10
        runs-on: ${{ matrix.os }}
        steps:
            -   name: Checkout
                uses: actions/checkout@v3
            -   name: Setup PHP
                uses: shivammathur/setup-php@v2
                with:
                    php-version: ${{ matrix.php-version }}
            -   name: Composer Install
                run: composer install --classmap-authoritative --no-interaction --no-cache --ignore-platform-req=php
            -   name: Setup Secure Shell Functional Tests
                if: matrix.os == 'ubuntu-latest'
                run: |
                    PHPSECLIB_SSH_USERNAME='phpseclib'
                    PHPSECLIB_SSH_PASSWORD='<PASSWORD>'
                    
                    sudo useradd --create-home --base-dir /home "$PHPSECLIB_SSH_USERNAME"
                    echo "$PHPSECLIB_SSH_USERNAME:$PHPSECLIB_SSH_PASSWORD" | sudo chpasswd
                    ssh-keygen -t rsa -b 1024 -f "$HOME/.ssh/id_rsa" -q -N ""
                    eval `ssh-agent -s`<commit_msg>Use lastest php version in ci<commit_after>name: CI
on: [push, pull_request]
jobs:
    lint:
        name: Lint
        timeout-minutes: 5
        runs-on: ubuntu-latest
        steps:
            -   name: Checkout
                uses: actions/checkout@v3
            -   name: Setup PHP
                uses: shivammathur/setup-php@v2
                with:
                    php-version: ${{ matrix.php-version }}
                env:
                    update: true
            -   name: Composer Install
                run: composer install --classmap-authoritative --no-interaction --no-cache
            -   name: Lint
                run: vendor/bin/parallel-lint --show-deprecated build phpseclib tests
        strategy:
            fail-fast: false
            matrix:
                php-version: ['8.1', '8.2']
    quality_tools:
        name: Quality Tools
        timeout-minutes: 5
        runs-on: ubuntu-latest
        steps:
            -   name: Checkout
                uses: actions/checkout@v3
            -   name: Setup PHP
                uses: shivammathur/setup-php@v2
                with:
                    php-version: '8.1'
                env:
                    update: true
            -   name: Composer Install
                run: composer install --classmap-authoritative --no-interaction --no-cache
            -   name: PHP_CodeSniffer
                run: vendor/bin/phpcs --standard=build/php_codesniffer.xml
            -   name: PHP CS Fixer
                run: vendor/bin/php-cs-fixer fix --config=build/php-cs-fixer.php --diff --dry-run --using-cache=no
            -   name: Psalm
                run: vendor/bin/psalm --config=build/psalm.xml --no-cache --long-progress --report-show-info=false
        strategy:
            fail-fast: false
    tests:
        name: Tests
        timeout-minutes: 10
        runs-on: ${{ matrix.os }}
        steps:
            -   name: Checkout
                uses: actions/checkout@v3
            -   name: Setup PHP
                uses: shivammathur/setup-php@v2
                with:
                    php-version: ${{ matrix.php-version }}
                env:
                    update: true
            -   name: Composer Install
                run: composer install --classmap-authoritative --no-interaction --no-cache --ignore-platform-req=php
            -   name: Setup Secure Shell Functional Tests
                if: matrix.os == 'ubuntu-latest'
                run: |
                    PHPSECLIB_SSH_USERNAME='phpseclib'
                    PHPSECLIB_SSH_PASSWORD='<PASSWORD>'
                    
                    sudo useradd --create-home --base-dir /home "$PHPSECLIB_SSH_USERNAME"
                    echo "$PHPSECLIB_SSH_USERNAME:$PHPSECLIB_SSH_PASSWORD" | sudo chpasswd
                    ssh-keygen -t rsa -b 1024 -f "$HOME/.ssh/id_rsa" -q -N ""
                    eval `ssh-agent -s`
{'fraction_non_alphanumeric': 0.09748316199929104, 'fraction_numerical': 0.007089684509039348, 'mean_word_length': 1.2419547079856972, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '1745195', 'n_tokens_mistral': 1685, 'n_tokens_neox': 1553, 'n_words': 355}