Merge pull request #33038 from woocommerce/update/workflow-cache
Cache Composer global store
This commit is contained in:
commit
779ce5c23e
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue