From bd037022bc9695f460af0ffc501bececf53c04c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= Date: Sat, 21 Sep 2024 13:26:24 +0200 Subject: [PATCH] use different caches for composer --- .forgejo/workflows/phpcs.yml | 2 +- .forgejo/workflows/phpunit.yml | 11 ++++++----- composer.json | 1 - 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.forgejo/workflows/phpcs.yml b/.forgejo/workflows/phpcs.yml index dccb6d0..5eddf5a 100755 --- a/.forgejo/workflows/phpcs.yml +++ b/.forgejo/workflows/phpcs.yml @@ -31,7 +31,7 @@ jobs: with: path: | ./vendor/ - key: cache-composer-4 + key: cache-composer-phpcs-1 - name: Setup PHP uses: https://github.com/shivammathur/setup-php@v2 diff --git a/.forgejo/workflows/phpunit.yml b/.forgejo/workflows/phpunit.yml index df87868..4444647 100644 --- a/.forgejo/workflows/phpunit.yml +++ b/.forgejo/workflows/phpunit.yml @@ -38,12 +38,12 @@ jobs: key: cache-wordpress-1 - name: Cache Composer - id: cache-composer + id: cache-composer-phpunit uses: https://code.forgejo.org/actions/cache@v4 with: path: | ./vendor/ - key: cache-composer-4 + key: cache-composer-phpunit-1 - name: Setup PHP uses: https://github.com/shivammathur/setup-php@v2 @@ -54,9 +54,10 @@ jobs: env: runner: self-hosted - - name: Install composer dependencies for PHP - if: steps.cache-composer.outputs.cache-hit != 'true' - uses: ramsey/composer-install@v3 + - name: Install PHP Unit + if: steps.cache-composer-phpunit.outputs.cache-hit != 'true' + # Polyfills requires all needed packages including phpunit itself. + uses: composer install --dev yoast/phpunit-polyfills:"^3.0" - name: Install and cache mysqladmin needed to initialize the test database uses: https://github.com/awalsh128/cache-apt-pkgs-action@latest diff --git a/composer.json b/composer.json index 238b8e1..2b19f28 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,6 @@ "wp-coding-standards/wpcs": "dev-develop", "dealerdirect/phpcodesniffer-composer-installer": "^1.0.0", "sirbrillig/phpcs-variable-analysis": "^2.11", - "yoast/phpunit-polyfills": "^3.0" }, "config": { "allow-plugins": true