diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index e14eecc141..83097a158d 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -16,10 +16,10 @@ jobs: # # Performs the following steps: # - Checks out the repository. - # - Configures caching for Composer. # - Sets up PHP. # - Logs debug information. - # - Installs Composer dependencies (from cache if possible). + # - Installs Composer dependencies (use cache if possible). + # - Make Composer packages available globally. # - Logs PHP_CodeSniffer debug information. # - Runs PHPCS on the full codebase with warnings suppressed. # - Runs PHPCS on the `tests` directory without warnings suppressed. @@ -33,20 +33,6 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 - - name: Get Composer cache directory - id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" - - - name: Set up Composer caching - uses: actions/cache@v2 - env: - cache-name: cache-composer-dependencies - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer- - - name: Set up PHP uses: shivammathur/setup-php@v2 with: @@ -60,9 +46,12 @@ jobs: composer --version - name: Install Composer dependencies - run: | - composer install --prefer-dist --no-suggest --no-progress --no-ansi --no-interaction - echo "${PWD}/vendor/bin" >> $GITHUB_PATH + uses: ramsey/composer-install@v1 + with: + composer-options: "--no-progress --no-ansi --no-interaction" + + - name: Make Composer packages available globally + run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH - name: Log PHPCS debug information run: phpcs -i diff --git a/.github/workflows/php-compatibility.yml b/.github/workflows/php-compatibility.yml index a3915189ab..6c3fb82ceb 100644 --- a/.github/workflows/php-compatibility.yml +++ b/.github/workflows/php-compatibility.yml @@ -17,10 +17,10 @@ jobs: # # Performs the following steps: # - Checks out the repository. - # - Configures caching for Composer. # - Sets up PHP. # - Logs debug information about the runner container. - # - Installs Composer dependencies (from cache if possible). + # - Installs Composer dependencies (use cache if possible). + # - Make Composer packages available globally. # - Logs PHP_CodeSniffer debug information. # - Runs the PHP compatibility tests. # - todo: Configure Slack notifications for failing scans. @@ -33,20 +33,6 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 - - name: Get Composer cache directory - id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" - - - name: Set up Composer caching - uses: actions/cache@v2 - env: - cache-name: cache-composer-dependencies - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer- - - name: Set up PHP uses: shivammathur/setup-php@v2 with: @@ -60,9 +46,12 @@ jobs: composer --version - name: Install Composer dependencies - run: | - composer install --prefer-dist --no-suggest --no-progress --no-ansi --no-interaction - echo "${PWD}/vendor/bin" >> $GITHUB_PATH + uses: ramsey/composer-install@v1 + with: + composer-options: "--no-progress --no-ansi --no-interaction" + + - name: Make Composer packages available globally + run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH - name: Log PHPCS debug information run: phpcs -i diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml index 89941a6ff9..0d14901f5e 100644 --- a/.github/workflows/phpunit-tests.yml +++ b/.github/workflows/phpunit-tests.yml @@ -191,9 +191,9 @@ jobs: cache-name: cache-composer-dependencies with: path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }} restore-keys: | - ${{ runner.os }}-composer- + ${{ runner.os }}-php-${{ matrix.php }}-composer- - name: Install Composer dependencies if: ${{ env.COMPOSER_INSTALL == true || env.LOCAL_PHP == '8.0-fpm' }}