<commit_before># https://help.github.com/en/categories/automating-your-workflow-with-github-actions

on:
  - pull_request
  - push

name: "Continuous Integration"

jobs:
  coding-standards:
    name: "Coding Standards"

    runs-on: ubuntu-latest

    steps:
      - name: "Checkout"
        uses: actions/checkout@master

      - name: "Disable Xdebug"
        run: php7.2 --ini | grep xdebug | sed 's/,$//' | xargs sudo rm

      - name: "Validate composer.json and composer.lock"
        run: php7.2 $(which composer) validate --strict

      - name: "Install locked dependencies with composer"
        run: php7.2 $(which composer) install --no-interaction --no-progress --no-suggest

      - name: "Run localheinz/composer-normalize"
        run: php7.2 $(which composer) normalize --dry-run

      - name: "Run friendsofphp/php-cs-fixer for source"
        run: php7.2 vendor/bin/php-cs-fixer fix --config=.php_cs --diff --diff-format=udiff --using-cache=no --verbose

      - name: "Run friendsofphp/php-cs-fixer for test fixtures"
        run: php7.2 vendor/bin/php-cs-fixer fix --config=.php_cs.fixture --diff --diff-format=udiff --using-cache=no --verbose

  static-code-analysis:
    name: "Static Code Analysis"

    runs-on: ubuntu-latest

    steps:
      - name: "Checkout"
        uses: actions/checkout@master

      - name: "Disable Xdebug"
        run: php7.3 --ini | grep xdebug | sed 's/,$//' | xargs sudo rm

      - name: "Install locked dependencies with composer"
        run: php7.3 $(which composer) install --no-interaction --no-progress --no-suggest

      - name: "Run phpstan/phpstan"
        run: php7.3 vendor/bin/phpstan analyse --configuration=phpstan.neon

  tests:
    name: "Tests"

    runs-on: ubuntu-latest

    strategy:
      matrix:
        php-binary:
          - php7.2
          - php7.3

        dependencies:
          - lowest
          - locked
          - highest

    steps:
      - name: "Checkout"
        uses: actions/checkout@master

      - name: "Disable Xdebug"
        run: ${{ matrix.php-binary }} --ini | grep xdebug | sed 's/,$//' | xargs sudo rm

      - name: "Install lowest dependencies with composer"
        if: matrix.dependencies == 'lowest'
        run: ${{ matrix.php-binary }} $(which composer) update --no-interaction --no-progress --no-suggest --prefer-lowest

      - name: "Install locked dependencies with composer"
        if: matrix.dependencies == 'locked'
        run: ${{ matrix.php-binary }} $(which composer) install --no-interaction --no-progress --no-suggest

      - name: "Install highest dependencies with composer"
        if: matrix.dependencies == 'highest'
        run: ${{ matrix.php-binary }} $(which composer) update --no-interaction --no-progress --no-suggest

      - name: "Run auto-review tests with phpunit/phpunit"
        run: ${{ matrix.php-binary }} vendor/bin/phpunit --configuration=test/AutoReview/phpunit.xml

      - name: "Run unit tests with phpunit/phpunit"
        run: ${{ matrix.php-binary }} vendor/bin/phpunit --configuration=test/Unit/phpunit.xml

      - name: "Run integration tests with phpunit/phpunit"
        run: ${{ matrix.php-binary }} vendor/bin/phpunit --configuration=test/Integration/phpunit.xml

  code-coverage:
    name: "Code Coverage"

    runs-on: ubuntu-latest

    steps:
      - name: "Checkout"
        uses: actions/checkout@master

      - name: "Install locked dependencies with composer"
        run: php7.3 $(which composer) install --no-interaction --no-progress --no-suggest

      - name: "Dump Xdebug filter with phpunit/phpunit"
        run: php7.3 vendor/bin/phpunit --configuration=test/Unit/phpunit.xml --dump-xdebug-filter=.build/phpunit/xdebug-filter.php

      - name: "Collect code coverage with Xdebug and phpunit/phpunit"
        run: php7.3 vendor/bin/phpunit --configuration=test/Unit/phpunit.xml --coverage-clover=build/logs/clover.xml --prepend=.build/phpunit/xdebug-filter.php

      - name: "Download code coverage uploader for Codecov.io"
        run: curl -s https://codecov.io/bash -o codecov

      - name: "Send code coverage report to Codecov.io"
        run: bash codecov -t ${{ secrets.CODECOV_TOKEN }}

  mutation-tests:
    name: "Mutation Tests"

    runs-on: ubuntu-latest

    steps:
      - name: "Checkout"
        uses: actions/checkout@master

      - name: "Install locked dependencies with composer"
        run: php7.3 $(which composer) install --no-interaction --no-progress --no-suggest

      - name: "Run mutation tests with infection/infection"
        run: php7.3 vendor/bin/infection --ignore-msi-with-no-mutations --min-covered-msi=100 --min-msi=100<commit_msg>Fix: Adjust MSI score<commit_after># https://help.github.com/en/categories/automating-your-workflow-with-github-actions

on:
  - pull_request
  - push

name: "Continuous Integration"

jobs:
  coding-standards:
    name: "Coding Standards"

    runs-on: ubuntu-latest

    steps:
      - name: "Checkout"
        uses: actions/checkout@master

      - name: "Disable Xdebug"
        run: php7.2 --ini | grep xdebug | sed 's/,$//' | xargs sudo rm

      - name: "Validate composer.json and composer.lock"
        run: php7.2 $(which composer) validate --strict

      - name: "Install locked dependencies with composer"
        run: php7.2 $(which composer) install --no-interaction --no-progress --no-suggest

      - name: "Run localheinz/composer-normalize"
        run: php7.2 $(which composer) normalize --dry-run

      - name: "Run friendsofphp/php-cs-fixer for source"
        run: php7.2 vendor/bin/php-cs-fixer fix --config=.php_cs --diff --diff-format=udiff --using-cache=no --verbose

      - name: "Run friendsofphp/php-cs-fixer for test fixtures"
        run: php7.2 vendor/bin/php-cs-fixer fix --config=.php_cs.fixture --diff --diff-format=udiff --using-cache=no --verbose

  static-code-analysis:
    name: "Static Code Analysis"

    runs-on: ubuntu-latest

    steps:
      - name: "Checkout"
        uses: actions/checkout@master

      - name: "Disable Xdebug"
        run: php7.3 --ini | grep xdebug | sed 's/,$//' | xargs sudo rm

      - name: "Install locked dependencies with composer"
        run: php7.3 $(which composer) install --no-interaction --no-progress --no-suggest

      - name: "Run phpstan/phpstan"
        run: php7.3 vendor/bin/phpstan analyse --configuration=phpstan.neon

  tests:
    name: "Tests"

    runs-on: ubuntu-latest

    strategy:
      matrix:
        php-binary:
          - php7.2
          - php7.3

        dependencies:
          - lowest
          - locked
          - highest

    steps:
      - name: "Checkout"
        uses: actions/checkout@master

      - name: "Disable Xdebug"
        run: ${{ matrix.php-binary }} --ini | grep xdebug | sed 's/,$//' | xargs sudo rm

      - name: "Install lowest dependencies with composer"
        if: matrix.dependencies == 'lowest'
        run: ${{ matrix.php-binary }} $(which composer) update --no-interaction --no-progress --no-suggest --prefer-lowest

      - name: "Install locked dependencies with composer"
        if: matrix.dependencies == 'locked'
        run: ${{ matrix.php-binary }} $(which composer) install --no-interaction --no-progress --no-suggest

      - name: "Install highest dependencies with composer"
        if: matrix.dependencies == 'highest'
        run: ${{ matrix.php-binary }} $(which composer) update --no-interaction --no-progress --no-suggest

      - name: "Run auto-review tests with phpunit/phpunit"
        run: ${{ matrix.php-binary }} vendor/bin/phpunit --configuration=test/AutoReview/phpunit.xml

      - name: "Run unit tests with phpunit/phpunit"
        run: ${{ matrix.php-binary }} vendor/bin/phpunit --configuration=test/Unit/phpunit.xml

      - name: "Run integration tests with phpunit/phpunit"
        run: ${{ matrix.php-binary }} vendor/bin/phpunit --configuration=test/Integration/phpunit.xml

  code-coverage:
    name: "Code Coverage"

    runs-on: ubuntu-latest

    steps:
      - name: "Checkout"
        uses: actions/checkout@master

      - name: "Install locked dependencies with composer"
        run: php7.3 $(which composer) install --no-interaction --no-progress --no-suggest

      - name: "Dump Xdebug filter with phpunit/phpunit"
        run: php7.3 vendor/bin/phpunit --configuration=test/Unit/phpunit.xml --dump-xdebug-filter=.build/phpunit/xdebug-filter.php

      - name: "Collect code coverage with Xdebug and phpunit/phpunit"
        run: php7.3 vendor/bin/phpunit --configuration=test/Unit/phpunit.xml --coverage-clover=build/logs/clover.xml --prepend=.build/phpunit/xdebug-filter.php

      - name: "Download code coverage uploader for Codecov.io"
        run: curl -s https://codecov.io/bash -o codecov

      - name: "Send code coverage report to Codecov.io"
        run: bash codecov -t ${{ secrets.CODECOV_TOKEN }}

  mutation-tests:
    name: "Mutation Tests"

    runs-on: ubuntu-latest

    steps:
      - name: "Checkout"
        uses: actions/checkout@master

      - name: "Install locked dependencies with composer"
        run: php7.3 $(which composer) install --no-interaction --no-progress --no-suggest

      - name: "Run mutation tests with infection/infection"
        run: php7.3 vendor/bin/infection --ignore-msi-with-no-mutations --min-covered-msi=96 --min-msi=96
{'fraction_non_alphanumeric': 0.13070984344842376, 'fraction_numerical': 0.007934805918936307, 'mean_word_length': 2.4089912280701755, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 12}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4430686', 'n_tokens_mistral': 3035, 'n_tokens_neox': 2815, 'n_words': 740}