diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 061d307..9372d66 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -18,14 +18,12 @@ jobs: dependencies: - lowest - highest - services: nsqd: image: nsqio/nsq:v1.2.0 options: --entrypoint /nsqd ports: - 4150:4150 - steps: - name: Checkout uses: actions/checkout@v2 @@ -119,3 +117,32 @@ jobs: - name: Run script run: composer psalm + + infection: + name: Infection + runs-on: ubuntu-latest + services: + nsqd: + image: nsqio/nsq:v1.2.0 + options: --entrypoint /nsqd + ports: + - 4150:4150 + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.0' + coverage: pcov + + - name: Install dependencies + run: composer update --no-progress --no-interaction --prefer-dist + + - name: Run script + env: + STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} + run: | + git fetch --depth=1 origin $GITHUB_BASE_REF + php vendor/bin/infection -j2 --git-diff-filter=A --git-diff-base=origin/$GITHUB_BASE_REF --logger-github --ignore-msi-with-no-mutations --only-covered diff --git a/.gitignore b/.gitignore index 4fbb073..6b59151 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,6 @@ /vendor/ /composer.lock + +/.php_cs.cache +/.phpunit.result.cache +/infection.log diff --git a/README.md b/README.md index f979630..0a7d9b6 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,8 @@ PHP Client for [NSQ](https://nsq.io/). -[![Latest Stable Version](https://poser.pugx.org/nsq/nsq/v)](//packagist.org/packages/nsq/nsq) [![Total Downloads](https://poser.pugx.org/nsq/nsq/downloads)](//packagist.org/packages/nsq/nsq) [![Latest Unstable Version](https://poser.pugx.org/nsq/nsq/v/unstable)](//packagist.org/packages/nsq/nsq) [![License](https://poser.pugx.org/nsq/nsq/license)](//packagist.org/packages/nsq/nsq) -[![codecov](https://codecov.io/gh/nsqphp/nsqphp/branch/main/graph/badge.svg?token=AYUMC3OO2B)](https://codecov.io/gh/nsqphp/nsqphp) +[![Latest Stable Version](https://poser.pugx.org/nsq/nsq/v)](//packagist.org/packages/nsq/nsq) [![Total Downloads](https://poser.pugx.org/nsq/nsq/downloads)](//packagist.org/packages/nsq/nsq) [![License](https://poser.pugx.org/nsq/nsq/license)](//packagist.org/packages/nsq/nsq) +[![codecov](https://codecov.io/gh/nsqphp/nsqphp/branch/main/graph/badge.svg?token=AYUMC3OO2B)](https://codecov.io/gh/nsqphp/nsqphp) [![Mutation testing badge](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fnsqphp%2Fnsqphp%2Fmain)](https://dashboard.stryker-mutator.io/reports/github.com/nsqphp/nsqphp/main) This library follow [SemVer](https://semver.org/). Until version 1.0 will be released anything MAY change at any time, public API SHOULD NOT be considered stable. If you want use it before stable version was released install strict version without range. diff --git a/composer.json b/composer.json index 66c10d6..09ab6b4 100644 --- a/composer.json +++ b/composer.json @@ -22,6 +22,7 @@ "dg/bypass-finals": "^1.3", "ergebnis/composer-normalize": "9999999-dev", "friendsofphp/php-cs-fixer": "^2.18", + "infection/infection": "^0.20.2", "phpstan/phpstan": "^0.12.68", "phpstan/phpstan-phpunit": "^0.12.17", "phpstan/phpstan-strict-rules": "^0.12.9", diff --git a/infection.json.dist b/infection.json.dist new file mode 100644 index 0000000..5908b23 --- /dev/null +++ b/infection.json.dist @@ -0,0 +1,17 @@ +{ + "source": { + "directories": [ + "src" + ] + }, + "logs": { + "text": "infection.log", + "github": true, + "badge": { + "branch": "main" + } + }, + "mutators": { + "@default": true + } +}