Merge pull request #33038 from woocommerce/update/workflow-cache

Cache Composer global store
This commit is contained in:
jonathansadowski 2022-05-16 10:22:12 -05:00 committed by GitHub
commit 779ce5c23e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 77 additions and 76 deletions

View File

@ -14,15 +14,15 @@ jobs:
- name: Checkout code.
uses: actions/checkout@v3
- name: Get cached composer and pnpm directories
- name: Dependency caching
uses: actions/cache@v3
id: cache-deps
with:
path: |
~/.pnpm-store
plugins/woocommerce/packages
plugins/woocommerce/**/vendor
key: ${{ runner.os }}-npm-composer-version-${{ secrets.WORKFLOW_CACHE }}-${{ hashFiles('**/composer.lock', '**/pnpm-lock.yaml') }}
~/.local/share/pnpm/store
~/.cache/composer/files
key: ${{ runner.os }}-build-release-zip-file-${{ secrets.WORKFLOW_CACHE }}-${{ hashFiles('**/composer.lock', '**/pnpm-lock.yaml') }}
- name: Install PNPM
run: npm install -g pnpm@^6.24.2

View File

@ -10,15 +10,15 @@ jobs:
- name: Checkout code.
uses: actions/checkout@v3
- name: Get cached composer and pnpm directories
- name: Dependency caching
uses: actions/cache@v3
id: cache-deps
with:
path: |
~/.pnpm-store
plugins/woocommerce/packages
plugins/woocommerce/**/vendor
key: ${{ runner.os }}-npm-composer-version-${{ secrets.WORKFLOW_CACHE }}-${{ hashFiles('**/composer.lock', '**/pnpm-lock.yaml') }}
~/.local/share/pnpm/store
~/.cache/composer/files
key: ${{ runner.os }}-build-release-${{ secrets.WORKFLOW_CACHE }}-${{ hashFiles('**/composer.lock', '**/pnpm-lock.yaml') }}
- name: Install PNPM
run: npm install -g pnpm@^6.24.2

View File

@ -53,15 +53,15 @@ jobs:
php --version
composer --version
- name: Get cached composer and pnpm directories
- name: Dependency caching
uses: actions/cache@v3
id: cache-deps
with:
path: |
~/.pnpm-store
plugins/woocommerce/packages
plugins/woocommerce/**/vendor
key: ${{ runner.os }}-npm-composer-version-${{ secrets.WORKFLOW_CACHE }}-${{ hashFiles('**/composer.lock', '**/pnpm-lock.yaml') }}
~/.local/share/pnpm/store
~/.cache/composer/files
key: ${{ runner.os }}-ci-${{ secrets.WORKFLOW_CACHE }}-${{ hashFiles('**/composer.lock', '**/pnpm-lock.yaml') }}
- name: Install PNPM
run: npm install -g pnpm@^6.24.2
@ -70,7 +70,6 @@ jobs:
run: pnpm install
- name: Install Composer dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
run: pnpm nx composer-install woocommerce
- name: Build Admin feature config

View File

@ -11,15 +11,15 @@ jobs:
- name: Checkout code.
uses: actions/checkout@v3
- name: Cache modules
- name: Dependency caching
uses: actions/cache@v3
id: cache-deps
with:
path: |
~/.pnpm-store
plugins/woocommerce/packages
plugins/woocommerce/**/vendor
key: ${{ runner.os }}-npm-composer-version-${{ secrets.WORKFLOW_CACHE }}-${{ hashFiles('**/composer.lock', '**/pnpm-lock.yaml') }}
~/.local/share/pnpm/store
~/.cache/composer/files
key: ${{ runner.os }}-mirrors-${{ secrets.WORKFLOW_CACHE }}-${{ hashFiles('**/composer.lock', '**/pnpm-lock.yaml') }}
- name: Install PNPM
run: npm install -g pnpm@^6.24.2

View File

@ -17,15 +17,15 @@ jobs:
with:
ref: ${{ matrix.build }}
- name: Get cached composer and pnpm directories
- name: Dependency caching
uses: actions/cache@v3
id: cache-deps
with:
path: |
~/.pnpm-store
plugins/woocommerce/packages
plugins/woocommerce/**/vendor
key: ${{ runner.os }}-npm-composer-version-${{ secrets.WORKFLOW_CACHE }}-${{ hashFiles('**/composer.lock', '**/pnpm-lock.yaml') }}
~/.local/share/pnpm/store
~/.cache/composer/files
key: ${{ runner.os }}-nightly-builds-${{ secrets.WORKFLOW_CACHE }}-${{ hashFiles('**/composer.lock', '**/pnpm-lock.yaml') }}
- name: Install PNPM
run: npm install -g pnpm@^6.24.2

View File

@ -12,15 +12,15 @@ jobs:
- name: Checkout code.
uses: actions/checkout@v3
- name: Cache modules
- name: Dependency caching
uses: actions/cache@v3
id: cache-deps
with:
path: |
~/.pnpm-store
plugins/woocommerce/packages
plugins/woocommerce/**/vendor
key: ${{ runner.os }}-npm-composer-version-${{ secrets.WORKFLOW_CACHE }}-${{ hashFiles('**/composer.lock', '**/pnpm-lock.yaml') }}
~/.local/share/pnpm/store
~/.cache/composer/files
key: ${{ runner.os }}-pr-build-and-e2e-tests-${{ secrets.WORKFLOW_CACHE }}-${{ hashFiles('**/composer.lock', '**/pnpm-lock.yaml') }}
- name: Install PNPM
run: npm install -g pnpm@^6.24.2
@ -29,7 +29,6 @@ jobs:
run: pnpm install
- name: Install Composer dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
run: pnpm nx composer-install-no-dev woocommerce
- name: Setup PHP
@ -70,15 +69,15 @@ jobs:
- name: Checkout code.
uses: actions/checkout@v3
- name: Cache modules
- name: Dependency caching
uses: actions/cache@v3
id: cache-deps
with:
path: |
~/.pnpm-store
plugins/woocommerce/packages
plugins/woocommerce/**/vendor
key: ${{ runner.os }}-npm-composer-version-${{ secrets.WORKFLOW_CACHE }}-${{ hashFiles('**/composer.lock', '**/pnpm-lock.yaml') }}
~/.local/share/pnpm/store
~/.cache/composer/files
key: ${{ runner.os }}-pr-build-and-e2e-tests-${{ secrets.WORKFLOW_CACHE }}-${{ hashFiles('**/composer.lock', '**/pnpm-lock.yaml') }}
- name: Install PNPM
run: npm install -g pnpm@^6.24.2
@ -87,7 +86,6 @@ jobs:
run: pnpm install
- name: Install Composer dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
run: pnpm nx composer-install woocommerce
- name: Setup PHP
@ -127,15 +125,15 @@ jobs:
- name: Checkout code.
uses: actions/checkout@v3
- name: Cache modules
- name: Dependency caching
uses: actions/cache@v3
id: cache-deps
with:
path: |
~/.pnpm-store
plugins/woocommerce/packages
plugins/woocommerce/**/vendor
key: ${{ runner.os }}-npm-composer-version-${{ secrets.WORKFLOW_CACHE }}-${{ hashFiles('**/composer.lock', '**/pnpm-lock.yaml') }}
~/.local/share/pnpm/store
~/.cache/composer/files
key: ${{ runner.os }}-pr-build-and-e2e-tests-${{ secrets.WORKFLOW_CACHE }}-${{ hashFiles('**/composer.lock', '**/pnpm-lock.yaml') }}
- name: Install PNPM
run: npm install -g pnpm@^6.24.2
@ -144,7 +142,6 @@ jobs:
run: pnpm install
- name: Install Composer dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
run: pnpm nx composer-install woocommerce
- name: Setup PHP

View File

@ -39,15 +39,15 @@ jobs:
php --version
composer --version
- name: Get cached composer and pnpm directories
- name: Dependency caching
uses: actions/cache@v3
id: cache-deps
with:
path: |
~/.pnpm-store
plugins/woocommerce/packages
plugins/woocommerce/**/vendor
key: ${{ runner.os }}-npm-composer-version-${{ secrets.WORKFLOW_CACHE }}-${{ hashFiles('**/composer.lock', '**/pnpm-lock.yaml') }}
~/.local/share/pnpm/store
~/.cache/composer/files
key: ${{ runner.os }}-pr-code-coverage-${{ secrets.WORKFLOW_CACHE }}-${{ hashFiles('**/composer.lock', '**/pnpm-lock.yaml') }}
- name: Install PNPM
run: npm install -g pnpm@^6.24.2
@ -56,7 +56,6 @@ jobs:
run: pnpm install
- name: Install Composer dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
run: pnpm nx composer-install woocommerce
- name: Build Admin feature config

View File

@ -29,15 +29,15 @@ jobs:
php --version
composer --version
- name: Get cached composer and pnpm directories
- name: Dependency caching
uses: actions/cache@v3
id: cache-deps
with:
path: |
~/.pnpm-store
plugins/woocommerce/packages
plugins/woocommerce/**/vendor
key: ${{ runner.os }}-npm-composer-version-${{ secrets.WORKFLOW_CACHE }}-${{ hashFiles('**/composer.lock', '**/pnpm-lock.yaml') }}
~/.local/share/pnpm/store
~/.cache/composer/files
key: ${{ runner.os }}-pr-code-sniff-${{ secrets.WORKFLOW_CACHE }}-${{ hashFiles('**/composer.lock', '**/pnpm-lock.yaml') }}
- name: Install PNPM
run: npm install -g pnpm@^6.24.2
@ -46,7 +46,6 @@ jobs:
run: pnpm install
- name: Install Composer dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
run: pnpm nx composer-install woocommerce
- name: Run code sniff

View File

@ -22,12 +22,15 @@ jobs:
with:
node-version: '16'
- name: Cache modules
- name: Dependency caching
uses: actions/cache@v3
id: cache-deps
with:
path: |
~/.pnpm-store
key: ${{ runner.os }}-npm-version-${{ secrets.WORKFLOW_CACHE }}-${{ hashFiles('**/pnpm-lock.yaml') }}
~/.local/share/pnpm/store
~/.cache/composer/files
key: ${{ runner.os }}-pr-lint-test-js-${{ secrets.WORKFLOW_CACHE }}-${{ hashFiles('**/composer.lock', '**/pnpm-lock.yaml') }}
- name: Install PNPM
run: npm install -g pnpm@^6.24.2

View File

@ -18,15 +18,15 @@ jobs:
- name: Checkout code.
uses: actions/checkout@v3
- name: Cache modules
- name: Dependency caching
uses: actions/cache@v3
id: cache-deps
with:
path: |
~/.pnpm-store
plugins/woocommerce/packages
plugins/woocommerce/**/vendor
key: ${{ runner.os }}-npm-composer-smoke-version-${{ secrets.WORKFLOW_CACHE }}-${{ hashFiles('**/composer.lock', '**/pnpm-lock.yaml') }}
~/.local/share/pnpm/store
~/.cache/composer/files
key: ${{ runner.os }}-pr-smoke-test-${{ secrets.WORKFLOW_CACHE }}-${{ hashFiles('**/composer.lock', '**/pnpm-lock.yaml') }}
- name: Install PNPM
run: npm install -g pnpm@^6.24.2
@ -38,7 +38,6 @@ jobs:
run: pnpm install
- name: Install Composer dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
run: pnpm nx composer-install-no-dev woocommerce
- name: Setup PHP

View File

@ -51,15 +51,15 @@ jobs:
php --version
composer --version
- name: Get cached composer and pnpm directories
- name: Dependency caching
uses: actions/cache@v3
id: cache-deps
with:
path: |
~/.pnpm-store
plugins/woocommerce/packages
plugins/woocommerce/**/vendor
key: ${{ runner.os }}-npm-composer-version-${{ secrets.WORKFLOW_CACHE }}-${{ hashFiles('**/composer.lock', '**/pnpm-lock.yaml') }}
~/.local/share/pnpm/store
~/.cache/composer/files
key: ${{ runner.os }}-pr-unit-tests-${{ secrets.WORKFLOW_CACHE }}-${{ hashFiles('**/composer.lock', '**/pnpm-lock.yaml') }}
- name: Install PNPM
run: npm install -g pnpm@^6.24.2
@ -68,7 +68,6 @@ jobs:
run: pnpm install
- name: Install Composer dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
run: pnpm nx composer-install woocommerce
- name: Build Admin feature config

View File

@ -17,15 +17,15 @@ jobs:
with:
ref: trunk
- name: Cache modules
- name: Dependency caching
uses: actions/cache@v3
id: cache-deps
with:
path: |
~/.pnpm-store
plugins/woocommerce/packages
plugins/woocommerce/**/vendor
key: ${{ runner.os }}-npm-composer-smoke-version-${{ secrets.WORKFLOW_CACHE }}-${{ hashFiles('**/composer.lock', '**/pnpm-lock.yaml') }}
~/.local/share/pnpm/store
~/.cache/composer/files
key: ${{ runner.os }}-smoke-test-daily-${{ secrets.WORKFLOW_CACHE }}-${{ hashFiles('**/composer.lock', '**/pnpm-lock.yaml') }}
- name: Install PNPM
run: npm install -g pnpm@^6.24.2
@ -37,7 +37,6 @@ jobs:
run: pnpm install
- name: Install Composer dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
run: pnpm nx composer-install-no-dev woocommerce
- name: Setup PHP
@ -90,13 +89,15 @@ jobs:
- name: Checkout code.
uses: actions/checkout@v3
- name: Cache modules
- name: Dependency caching
uses: actions/cache@v3
id: cache-deps
with:
path: |
~/.pnpm-store
key: ${{ runner.os }}-npm-smoke-version-${{ secrets.WORKFLOW_CACHE }}-${{ hashFiles('**/pnpm-lock.yaml') }}
~/.local/share/pnpm/store
~/.cache/composer/files
key: ${{ runner.os }}-smoke-test-daily-${{ secrets.WORKFLOW_CACHE }}-${{ hashFiles('**/composer.lock', '**/pnpm-lock.yaml') }}
- name: Install PNPM
run: npm install -g pnpm@^6.24.2
@ -154,13 +155,15 @@ jobs:
with:
path: package/woocommerce
- name: Cache modules
- name: Dependency caching
uses: actions/cache@v3
id: cache-deps
with:
path: |
~/.pnpm-store
key: ${{ runner.os }}-npm-smoke-version-${{ secrets.WORKFLOW_CACHE }}-${{ hashFiles('**/pnpm-lock.yaml') }}
~/.local/share/pnpm/store
~/.cache/composer/files
key: ${{ runner.os }}-smoke-test-daily-${{ secrets.WORKFLOW_CACHE }}-${{ hashFiles('**/composer.lock', '**/pnpm-lock.yaml') }}
- name: Install PNPM
run: npm install -g pnpm@^6.24.2

View File

@ -15,15 +15,15 @@ jobs:
with:
ref: trunk
- name: Cache modules
- name: Dependency caching
uses: actions/cache@v3
id: cache-deps
with:
path: |
~/.pnpm-store
plugins/woocommerce/packages
plugins/woocommerce/**/vendor
key: ${{ runner.os }}-npm-composer-smoke-version-${{ secrets.WORKFLOW_CACHE }}-${{ hashFiles('**/composer.lock', '**/pnpm-lock.yaml') }}
~/.local/share/pnpm/store
~/.cache/composer/files
key: ${{ runner.os }}-smoke-test-release-${{ secrets.WORKFLOW_CACHE }}-${{ hashFiles('**/composer.lock', '**/pnpm-lock.yaml') }}
- name: Install PNPM
run: npm install -g pnpm@^6.24.2
@ -35,7 +35,6 @@ jobs:
run: pnpm install
- name: Install Composer dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
run: pnpm nx composer-install-no-dev woocommerce
- name: Setup PHP
@ -87,13 +86,15 @@ jobs:
with:
path: package/woocommerce
- name: Cache modules
- name: Dependency caching
uses: actions/cache@v3
id: cache-deps
with:
path: |
~/.pnpm-store
key: ${{ runner.os }}-npm-smoke-version-${{ secrets.WORKFLOW_CACHE }}-${{ hashFiles('**/pnpm-lock.yaml') }}
~/.local/share/pnpm/store
~/.cache/composer/files
key: ${{ runner.os }}-smoke-test-release-${{ secrets.WORKFLOW_CACHE }}-${{ hashFiles('**/composer.lock', '**/pnpm-lock.yaml') }}
- name: Fetch Asset ID
id: fetch_asset_id
@ -176,13 +177,15 @@ jobs:
with:
path: package/woocommerce
- name: Cache modules
- name: Dependency caching
uses: actions/cache@v3
id: cache-deps
with:
path: |
~/.pnpm-store
key: ${{ runner.os }}-npm-smoke-version-${{ secrets.WORKFLOW_CACHE }}-${{ hashFiles('**/pnpm-lock.yaml') }}
~/.local/share/pnpm/store
~/.cache/composer/files
key: ${{ runner.os }}-smoke-test-release-${{ secrets.WORKFLOW_CACHE }}-${{ hashFiles('**/composer.lock', '**/pnpm-lock.yaml') }}
- name: Fetch Asset ID
id: fetch_asset_id