From 5f130d8dee15da091d186f11fceb83360285ef04 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Sat, 9 Dec 2023 23:02:03 +0100 Subject: [PATCH] GH Actions: few small workflow tweaks * Remove some information from a step name which is already in a comment above it. * Fold two steps into one (Composer install). * Add a missing condition to prevent a step from running when it is not needed. --- .github/workflows/test.yml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7dcf4f41b4..46c745d0c7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -110,7 +110,7 @@ jobs: tools: cs2pr # This action also handles the caching of the dependencies. - - name: Set up node and enable caching of dependencies + - name: Set up node uses: actions/setup-node@v4 with: node-version: '20' @@ -125,18 +125,9 @@ jobs: # Install dependencies and handle caching in one go. # @link https://github.com/marketplace/actions/install-php-dependencies-with-composer - name: Install Composer dependencies - if: ${{ matrix.php != '8.4' }} uses: "ramsey/composer-install@v2" with: - # Bust the cache at least once a month - output format: YYYY-MM. - custom-cache-suffix: $(date -u "+%Y-%m") - - # For PHP "nightly", we install with ignore platform reqs. - - name: Install Composer dependencies - with ignore platform - if: ${{ matrix.php == '8.4' }} - uses: "ramsey/composer-install@v2" - with: - composer-options: --ignore-platform-req=php + composer-options: ${{ matrix.php == '8.4' && '--ignore-platform-req=php' || '' }} custom-cache-suffix: $(date -u "+%Y-%m") # Note: The code style check is run multiple times against every PHP version @@ -161,6 +152,7 @@ jobs: run: cs2pr ./phpcs-report.xml - name: Download the PHPCS phar + if: ${{ matrix.custom_ini == false }} uses: actions/download-artifact@v3 with: name: phpcs-phar