From bd31b9932454a7299fd8736985490def1ddb0d8c Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sat, 13 Aug 2022 12:31:12 +0200 Subject: [PATCH] Ensured only mutants for changed lines are executed in CI mutation tests --- .github/workflows/ci-mutation-tests.yml | 4 ++-- composer.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-mutation-tests.yml b/.github/workflows/ci-mutation-tests.yml index 85b74f54..a4ce7432 100644 --- a/.github/workflows/ci-mutation-tests.yml +++ b/.github/workflows/ci-mutation-tests.yml @@ -25,8 +25,8 @@ jobs: with: path: build - if: ${{ inputs.test-group == 'unit' }} - run: composer infect:ci:unit + run: composer infect:ci:unit -- --git-diff-lines --logger-github=false env: INFECTION_BADGE_API_KEY: ${{ secrets.INFECTION_BADGE_API_KEY }} - if: ${{ inputs.test-group != 'unit' }} - run: composer infect:ci:${{ inputs.test-group }} + run: composer infect:ci:${{ inputs.test-group }} -- --git-diff-lines --logger-github=false diff --git a/composer.json b/composer.json index 0cc0e65c..ad11461b 100644 --- a/composer.json +++ b/composer.json @@ -125,7 +125,7 @@ "test:cli": "APP_ENV=test DB_DRIVER=maria TEST_ENV=cli php vendor/bin/phpunit --order-by=random --colors=always --testdox -c phpunit-cli.xml --log-junit=build/coverage-cli/junit.xml", "test:cli:ci": "GENERATE_COVERAGE=yes composer test:cli", "test:cli:pretty": "GENERATE_COVERAGE=pretty composer test:cli", - "infect:ci:base": "infection --threads=4 --log-verbosity=default --only-covered --only-covering-test-cases --skip-initial-tests", + "infect:ci:base": "infection --threads=4 --only-covered --only-covering-test-cases --skip-initial-tests", "infect:ci:unit": "@infect:ci:base --coverage=build/coverage-unit --min-msi=84", "infect:ci:db": "@infect:ci:base --coverage=build/coverage-db --min-msi=95 --configuration=infection-db.json", "infect:ci:api": "@infect:ci:base --coverage=build/coverage-api --min-msi=80 --configuration=infection-api.json",