1010 - ' composer.*'
1111 - ' phpunit*'
1212 - ' .github/workflows/infection.yml'
13- push :
14- branches :
15- - develop
16- - ' v*'
17- paths :
18- - ' **.php'
19- - ' composer.*'
20- - ' phpunit*'
21- - ' .github/workflows/infection.yml'
2213
2314jobs :
2415 main :
@@ -33,12 +24,12 @@ jobs:
3324 - name : Set up PHP
3425 uses : shivammathur/setup-php@v2
3526 with :
36- php-version : ' 8.0 '
27+ php-version : ' 8.1 '
3728 tools : infection, phpunit
3829 extensions : intl, json, mbstring, gd, xml, sqlite3
3930 coverage : xdebug
4031 env :
41- COMPOSER_TOKEN : ${{ secrets.GITHUB_TOKEN }}
32+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4233
4334 - name : Set up problem matchers for PHPUnit
4435 run : echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
@@ -47,13 +38,12 @@ jobs:
4738 uses : mheap/phpunit-matcher-action@v1
4839
4940 - name : Get composer cache directory
50- id : composer-cache
51- run : echo "::set-output name=dir::$(composer config cache-files-dir)"
41+ run : echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV
5242
5343 - name : Cache composer dependencies
5444 uses : actions/cache@v3
5545 with :
56- path : ${{ steps.composer-cache.outputs.dir }}
46+ path : ${{ env.COMPOSER_CACHE_FILES_DIR }}
5747 key : ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }}
5848 restore-keys : ${{ runner.os }}-composer-
5949
6555 composer update --no-progress --no-interaction --prefer-dist --optimize-autoloader
6656 fi
6757
68- - name : Test with PHPUnit
69- run : vendor/bin/phpunit --teamcity
70-
71- - name : Mutate with Infection
58+ - name : Run Infection for added files only
7259 run : |
7360 git fetch --depth=1 origin $GITHUB_BASE_REF
74- infection --threads=2 --skip-initial-tests --coverage=build/phpunit -- git-diff-base=origin/$GITHUB_BASE_REF --git-diff-filter=AM --logger-github --ignore-msi-with-no-mutations
61+ infection --threads=max --git-diff-lines --git-diff-base=origin/$GITHUB_BASE_REF --ignore-msi-with-no-mutations --only-covered --logger-github
0 commit comments