diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 778f80c3..8c8d7d47 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -267,7 +267,12 @@ jobs: - uses: actions/download-artifact@v2 with: path: build - - run: composer infect:ci:${{ matrix.test-group }} + - if: ${{ matrix.test-group == 'unit' }} + run: composer infect:ci:unit + env: + INFECTION_BADGE_API_KEY: ${{ secrets.INFECTION_BADGE_API_KEY }} + - if: ${{ matrix.test-group == 'db' }} + run: composer infect:ci:db upload-coverage: needs: diff --git a/README.md b/README.md index cd15bb5c..ce91829f 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![Build Status](https://img.shields.io/github/workflow/status/shlinkio/shlink/Continuous%20integration/develop?logo=github&style=flat-square)](https://github.com/shlinkio/shlink/actions?query=workflow%3A%22Continuous+integration%22) [![Code Coverage](https://img.shields.io/codecov/c/gh/shlinkio/shlink/develop?style=flat-square)](https://app.codecov.io/gh/shlinkio/shlink) +[![Infection MSI](https://img.shields.io/endpoint?style=flat-square&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fshlinkio%2Fshlink%2Fdevelop)](https://dashboard.stryker-mutator.io/reports/github.com/shlinkio/shlink/develop) [![Latest Stable Version](https://img.shields.io/github/release/shlinkio/shlink.svg?style=flat-square)](https://packagist.org/packages/shlinkio/shlink) [![Docker pulls](https://img.shields.io/docker/pulls/shlinkio/shlink.svg?logo=docker&style=flat-square)](https://hub.docker.com/r/shlinkio/shlink/) [![License](https://img.shields.io/github/license/shlinkio/shlink.svg?style=flat-square)](https://github.com/shlinkio/shlink/blob/main/LICENSE) diff --git a/infection.json b/infection.json index b182bddf..1b4ed6b5 100644 --- a/infection.json +++ b/infection.json @@ -8,7 +8,10 @@ "logs": { "text": "build/infection-unit/infection-log.txt", "summary": "build/infection-unit/summary-log.txt", - "debug": "build/infection-unit/debug-log.txt" + "debug": "build/infection-unit/debug-log.txt", + "badge": { + "branch": "develop" + } }, "tmpDir": "build/infection-unit/temp", "phpUnit": { diff --git a/module/Core/src/Tag/Model/TagRenaming.php b/module/Core/src/Tag/Model/TagRenaming.php index 1f677376..3bdae21c 100644 --- a/module/Core/src/Tag/Model/TagRenaming.php +++ b/module/Core/src/Tag/Model/TagRenaming.php @@ -10,20 +10,13 @@ use function sprintf; final class TagRenaming { - private string $oldName; - private string $newName; - - private function __construct() + private function __construct(private string $oldName, private string $newName) { } public static function fromNames(string $oldName, string $newName): self { - $o = new self(); - $o->oldName = $oldName; - $o->newName = $newName; - - return $o; + return new self($oldName, $newName); } public static function fromArray(array $payload): self