diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8372725ccd..83ddbec786 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -229,12 +229,15 @@ jobs: php-version: "${{ matrix.php-version }}" extensions: ds,mbstring - - name: "Install dependencies" - run: "composer install --no-interaction --no-progress" + - uses: "ramsey/composer-install@v3" + + - uses: "ramsey/composer-install@v3" + with: + working-directory: "tests/" - - name: "Install build-infection dependencies" - working-directory: "build-infection" - run: "composer install --no-interaction --no-progress" + - uses: "ramsey/composer-install@v3" + with: + working-directory: "build-infection/" - name: "Configure infection" run: | @@ -257,12 +260,21 @@ jobs: restore-keys: | result-cache-v1-${{ matrix.php-version }}- + # see https://infection.github.io/guide/command-line-options.html#coverage + - name: "Create coverage in parallel" + run: | + php -d pcov.enabled=1 tests/vendor/bin/paratest \ + --passthru-php="'-d' 'pcov.enabled=1'" \ + --coverage-xml=tmp/coverage/coverage-xml --log-junit=tmp/coverage/junit.xml + - name: "Run infection" run: | git fetch --depth=1 origin ${{ steps.default-branch.outputs.name }} infection \ --git-diff-base=origin/${{ steps.default-branch.outputs.name }} \ --git-diff-lines \ + --coverage=tmp/coverage \ + --skip-initial-tests \ --ignore-msi-with-no-mutations \ --min-msi=100 \ --min-covered-msi=100 \ diff --git a/phpunit.xml b/phpunit.xml index 8411e782a1..8caf6bb5e6 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -15,5 +15,10 @@ levels + + + src + +