@@ -15,18 +15,24 @@ jobs:
1515 dependency-versions : ['lowest', 'highest']
1616 runs-on : ubuntu-latest
1717 steps :
18- - uses : actions/checkout@v2
18+ - uses : actions/checkout@v4
1919 with :
2020 fetch-depth : 0 # Shallow clones should be disabled for a better relevancy of analysis
21-
21+
2222 - uses : shivammathur/setup-php@v2
2323 with :
2424 php-version : ${{ matrix.php-versions }}
25-
25+
2626 - run : composer validate --strict
27-
28- - run : composer install --prefer-dist --no-progress --no-suggest
29-
27+
28+ - uses : ramsey/composer-install@v2
29+ with :
30+ dependency-versions : ${{ matrix.dependency-versions }}
31+
32+ - name : Upgrade analysis tools to latest
33+ if : ${{ matrix.dependency-versions == 'lowest' }}
34+ run : composer update phpstan/phpstan rector/rector phpunit/phpunit squizlabs/php_codesniffer --with-all-dependencies --no-interaction
35+
3036 - run : vendor/bin/phpcs
3137 if : ${{ failure() || success() }}
3238
@@ -38,12 +44,12 @@ jobs:
3844
3945 - run : XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-clover ./clover.xml --log-junit ./phpunit.report.xml
4046 if : ${{ failure() || success() }}
41-
47+
4248 # https://community.sonarsource.com/t/code-coverage-doesnt-work-with-github-action/16747
4349 # $GITHUB_WORKSPACE contains a slash so @ is used as delimiter
4450 - run : sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' clover.xml
4551 - run : sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' phpunit.report.xml
46-
52+
4753 - uses : sonarsource/sonarcloud-github-action@master
4854 env :
4955 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
0 commit comments