From aaa5dd14c8e0b7e9dc7d53d8e29dbbba246b6621 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Thu, 3 Oct 2024 04:31:58 +0200 Subject: [PATCH] GH Actions/PHPStan: use reusable workflow A number of reusable workflows have been introduced in the `PHPCSStandards/.github` repository for workflows used in multiple repos in this organisation, for which the steps are basically the same everywhere. This will make maintenance of these workflows more straight-forward. This commit switches the PHPStan workflow over to start using the reusable workflow. --- .github/workflows/cs.yml | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/.github/workflows/cs.yml b/.github/workflows/cs.yml index 8738bd4..7e1413d 100644 --- a/.github/workflows/cs.yml +++ b/.github/workflows/cs.yml @@ -99,28 +99,4 @@ jobs: run: cs2pr ./phpcs-report.xml phpstan: - name: "PHPStan" - runs-on: "ubuntu-latest" - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Install PHP - uses: shivammathur/setup-php@v2 - with: - php-version: 'latest' - coverage: none - tools: phpstan - - # Install dependencies and handle caching in one go. - # Dependencies need to be installed to make sure the PHPCS and PHPUnit classes are recognized. - # @link https://github.com/marketplace/actions/install-composer-dependencies - - name: Install Composer dependencies - uses: "ramsey/composer-install@v3" - with: - # Bust the cache at least once a month - output format: YYYY-MM. - custom-cache-suffix: $(date -u "+%Y-%m") - - - name: Run PHPStan - run: phpstan analyse + uses: PHPCSStandards/.github/.github/workflows/reusable-phpstan.yml@main