99 - ' composer.*'
1010 - ' phpunit*'
1111 - ' .github/workflows/infection.yml'
12- push :
13- branches :
14- - develop
15- paths :
16- - ' **.php'
17- - ' composer.*'
18- - ' phpunit*'
19- - ' .github/workflows/infection.yml'
2012
2113jobs :
2214 main :
3628 extensions : intl, json, mbstring, gd, xml, sqlite3
3729 coverage : xdebug
3830 env :
39- COMPOSER_TOKEN : ${{ secrets.GITHUB_TOKEN }}
31+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4032
4133 - name : Set up problem matchers for PHPUnit
4234 run : echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
@@ -45,13 +37,12 @@ jobs:
4537 uses : mheap/phpunit-matcher-action@v1
4638
4739 - name : Get composer cache directory
48- id : composer-cache
49- run : echo "::set-output name=dir::$(composer config cache-files-dir)"
40+ run : echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV
5041
5142 - name : Cache composer dependencies
52- uses : actions/cache@v3
43+ uses : actions/cache@v4
5344 with :
54- path : ${{ steps.composer-cache.outputs.dir }}
45+ path : ${{ env.COMPOSER_CACHE_FILES_DIR }}
5546 key : ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }}
5647 restore-keys : ${{ runner.os }}-composer-
5748
6354 composer update --no-progress --no-interaction --prefer-dist --optimize-autoloader
6455 fi
6556
66- - name : Test with PHPUnit
67- run : vendor/bin/phpunit --teamcity
68-
69- - name : Mutate with Infection
57+ - name : Run Infection for added files only
7058 run : |
7159 git fetch --depth=1 origin $GITHUB_BASE_REF
72- 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
60+ 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