[dev] CI: liverage composer packages cache in pr-lint-monorepo workflow (#52054)

This commit is contained in:
Vladimir Reznichenko 2024-10-16 12:02:31 +02:00 committed by GitHub
parent e148229edb
commit 46433747a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
60 changed files with 163 additions and 35 deletions

View File

@ -13,11 +13,14 @@ inputs:
build-type:
description: 'Given "full" or "backend" will perform optimized build steps.'
default: 'full'
pull-package-deps:
description: 'Given a string value, will pull the package specific dependencies cache.'
default: false
pull-playwright-cache:
description: 'Given a boolean value, invokes Playwright dependencies caching.'
default: false
pull-package-deps:
description: 'Given a string value, will pull the package specific dependencies cache.'
pull-package-composer-deps:
description: 'Given a string value, will pull the package specific dependencies cache. Not necessary if pull-package-deps is specified.'
default: false
runs:
using: 'composite'
@ -62,12 +65,12 @@ runs:
key: "${{ runner.os }}-node-cache-${{ inputs.pull-package-deps }}-${{ hashFiles( 'pnpm-lock.yaml' ) }}"
restore-keys: '${{ runner.os }}-node-cache-${{ inputs.pull-package-deps }}-'
- name: 'Cache Composer Dependencies'
if: ${{ inputs.pull-package-deps != 'false' }}
if: ${{ inputs.pull-package-deps != 'false' || inputs.pull-package-composer-deps != 'false' }}
uses: 'actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319'
with:
path: '~/.cache/composer/files'
key: "${{ runner.os }}-composer-${{ inputs.pull-package-deps }}-${{ hashFiles( 'packages/*/*/composer.lock', 'plugins/*/composer.lock' ) }}"
restore-keys: '${{ runner.os }}-composer-${{ inputs.pull-package-deps }}-'
key: "${{ runner.os }}-composer-${{ ( inputs.pull-package-deps != 'false' && inputs.pull-package-deps ) || inputs.pull-package-composer-deps }}-${{ hashFiles( 'packages/*/*/composer.lock', 'plugins/*/composer.lock' ) }}"
restore-keys: "${{ runner.os }}-composer-${{ ( inputs.pull-package-deps != 'false' && inputs.pull-package-deps ) || inputs.pull-package-composer-deps }}-"
- name: 'Cache: playwright downloads'
if: ${{ inputs.pull-playwright-cache != 'false' }}
uses: 'actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319'

View File

@ -1,14 +1,20 @@
name: Run lint checks potentially affecting projects across the monorepo
on:
pull_request:
paths-ignore:
- '**/changelog/**'
branches:
- 'trunk'
concurrency:
group: changelogger-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
permissions: {}
env:
FORCE_COLOR: 1
jobs:
changelogger_used:
name: Changelogger use
@ -24,6 +30,9 @@ jobs:
- name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo
with:
# The package has majority of composer-deps, therefore referencing it
pull-package-composer-deps: '@woocommerce/plugin-woocommerce'
- name: Check change files are touched for touched projects
env:
@ -32,4 +41,4 @@ jobs:
run: php tools/monorepo/check-changelogger-use.php --debug "$BASE" "$HEAD"
- name: Run changelog validation
run: pnpm -r changelog validate
run: pnpm --recursive --parallel --stream changelog validate

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
CI: liverage composer packages cache in lint monorepo job

View File

@ -29,7 +29,7 @@
"build": "pnpm --if-present --workspace-concurrency=Infinity --stream --filter=\"$npm_package_name...\" '/^build:project:.*$/'",
"build:project": "pnpm --if-present '/^build:project:.*$/'",
"build:project:typescript": "wireit",
"changelog": "composer install && composer exec -- changelogger",
"changelog": "XDEBUG_MODE=off composer install --quiet && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint src --fix",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
CI: liverage composer packages cache in lint monorepo job

View File

@ -39,7 +39,7 @@
"build:project:bundle": "wireit",
"build:project:cjs": "wireit",
"build:project:esm": "wireit",
"changelog": "composer install && composer exec -- changelogger",
"changelog": "XDEBUG_MODE=off composer install --quiet && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint src --fix",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
CI: liverage composer packages cache in lint monorepo job

View File

@ -37,7 +37,7 @@
"build:project:bundle": "wireit",
"build:project:cjs": "wireit",
"build:project:esm": "wireit",
"changelog": "composer install && composer exec -- changelogger",
"changelog": "XDEBUG_MODE=off composer install --quiet && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint src --fix",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
CI: liverage composer packages cache in lint monorepo job

View File

@ -33,7 +33,7 @@
"build": "pnpm --if-present --workspace-concurrency=Infinity --stream --filter=\"$npm_package_name...\" '/^build:project:.*$/'",
"build:project": "pnpm --if-present '/^build:project:.*$/'",
"build:project:typescript": "wireit",
"changelog": "composer install && composer exec -- changelogger",
"changelog": "XDEBUG_MODE=off composer install --quiet && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint src --fix",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
CI: liverage composer packages cache in lint monorepo job

View File

@ -36,7 +36,7 @@
"build:project:bundle": "wireit",
"build:project:cjs": "wireit",
"build:project:esm": "wireit",
"changelog": "composer install && composer exec -- changelogger",
"changelog": "XDEBUG_MODE=off composer install --quiet && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint src --fix",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
CI: liverage composer packages cache in lint monorepo job

View File

@ -41,7 +41,7 @@
"build:project:bundle": "wireit",
"build:project:cjs": "wireit",
"build:project:esm": "wireit",
"changelog": "composer install && composer exec -- changelogger",
"changelog": "XDEBUG_MODE=off composer install --quiet && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint --ext=js,ts,tsx src --fix",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
CI: liverage composer packages cache in lint monorepo job

View File

@ -10,7 +10,7 @@
"pnpm": "9.1.3"
},
"scripts": {
"changelog": "composer install && composer exec -- changelogger"
"changelog": "XDEBUG_MODE=off composer install --quiet && composer exec -- changelogger"
},
"repository": {
"type": "git",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
CI: liverage composer packages cache in lint monorepo job

View File

@ -18,7 +18,7 @@
"url": "https://github.com/woocommerce/woocommerce/issues"
},
"scripts": {
"changelog": "composer install && composer exec -- changelogger"
"changelog": "XDEBUG_MODE=off composer install --quiet && composer exec -- changelogger"
},
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/create-woo-extension#readme",
"devDependencies": {

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
CI: liverage composer packages cache in lint monorepo job

View File

@ -35,7 +35,7 @@
"build:project": "pnpm --if-present '/^build:project:.*$/'",
"build:project:cjs": "wireit",
"build:project:esm": "wireit",
"changelog": "composer install && composer exec -- changelogger",
"changelog": "XDEBUG_MODE=off composer install --quiet && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint src --fix",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
CI: liverage composer packages cache in lint monorepo job

View File

@ -35,7 +35,7 @@
"build:project": "pnpm --if-present '/^build:project:.*$/'",
"build:project:cjs": "wireit",
"build:project:esm": "wireit",
"changelog": "composer install && composer exec -- changelogger",
"changelog": "XDEBUG_MODE=off composer install --quiet && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint src --fix",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
CI: liverage composer packages cache in lint monorepo job

View File

@ -36,7 +36,7 @@
"build:project:bundle": "wireit",
"build:project:cjs": "wireit",
"build:project:esm": "wireit",
"changelog": "composer install && composer exec -- changelogger",
"changelog": "XDEBUG_MODE=off composer install --quiet && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint src --fix",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
CI: liverage composer packages cache in lint monorepo job

View File

@ -34,7 +34,7 @@
"build:project": "pnpm --if-present '/^build:project:.*$/'",
"build:project:cjs": "wireit",
"build:project:esm": "wireit",
"changelog": "composer install && composer exec -- changelogger",
"changelog": "XDEBUG_MODE=off composer install --quiet && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint src --fix",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
CI: liverage composer packages cache in lint monorepo job

View File

@ -67,7 +67,7 @@
"build:project": "pnpm --if-present '/^build:project:.*$/'",
"build:project:cjs": "wireit",
"build:project:esm": "wireit",
"changelog": "composer install && composer exec -- changelogger",
"changelog": "XDEBUG_MODE=off composer install --quiet && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint src --fix",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
CI: liverage composer packages cache in lint monorepo job

View File

@ -45,7 +45,7 @@
"wireit": "0.14.3"
},
"scripts": {
"changelog": "composer install && composer exec -- changelogger",
"changelog": "XDEBUG_MODE=off composer install --quiet && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint src --fix",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
CI: liverage composer packages cache in lint monorepo job

View File

@ -41,7 +41,7 @@
"access": "public"
},
"scripts": {
"changelog": "composer install && composer exec -- changelogger",
"changelog": "XDEBUG_MODE=off composer install --quiet && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint ./rules ./configs --fix",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
CI: liverage composer packages cache in lint monorepo job

View File

@ -95,7 +95,7 @@
"build:project:bundle": "wireit",
"build:project:cjs": "wireit",
"build:project:esm": "wireit",
"changelog": "composer install && composer exec -- changelogger",
"changelog": "XDEBUG_MODE=off composer install --quiet && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint src --fix",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
CI: liverage composer packages cache in lint monorepo job

View File

@ -35,7 +35,7 @@
"build:project": "pnpm --if-present '/^build:project:.*$/'",
"build:project:cjs": "wireit",
"build:project:esm": "wireit",
"changelog": "composer install && composer exec -- changelogger",
"changelog": "XDEBUG_MODE=off composer install --quiet && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint src --fix",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
CI: liverage composer packages cache in lint monorepo job

View File

@ -43,7 +43,7 @@
"build:project": "pnpm --if-present '/^build:project:.*$/'",
"build:project:cjs": "wireit",
"build:project:esm": "wireit",
"changelog": "composer install && composer exec -- changelogger",
"changelog": "XDEBUG_MODE=off composer install --quiet && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint src --fix",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
CI: liverage composer packages cache in lint monorepo job

View File

@ -18,7 +18,7 @@
"url": "https://github.com/woocommerce/woocommerce/issues"
},
"scripts": {
"changelog": "composer install && composer exec -- changelogger"
"changelog": "XDEBUG_MODE=off composer install --quiet && composer exec -- changelogger"
},
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/extend-cart-checkout-block#readme",
"devDependencies": {

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
CI: liverage composer packages cache in lint monorepo job

View File

@ -32,7 +32,7 @@
"build:project": "pnpm --if-present '/^build:project:.*$/'",
"build:project:cjs": "wireit",
"build:project:esm": "wireit",
"changelog": "composer install && composer exec -- changelogger",
"changelog": "XDEBUG_MODE=off composer install --quiet && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint src --fix",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
CI: liverage composer packages cache in lint monorepo job

View File

@ -30,7 +30,7 @@
"build:project": "pnpm --if-present '/^build:project:.*$/'",
"build:project:cjs": "wireit",
"build:project:esm": "wireit",
"changelog": "composer install && composer exec -- changelogger",
"changelog": "XDEBUG_MODE=off composer install --quiet && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint src --fix",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
CI: liverage composer packages cache in lint monorepo job

View File

@ -35,7 +35,7 @@
"build:project": "pnpm --if-present '/^build:project:.*$/'",
"build:project:cjs": "wireit",
"build:project:esm": "wireit",
"changelog": "composer install && composer exec -- changelogger",
"changelog": "XDEBUG_MODE=off composer install --quiet && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint src --fix",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
CI: liverage composer packages cache in lint monorepo job

View File

@ -36,7 +36,7 @@
"build:project": "pnpm --if-present '/^build:project:.*$/'",
"build:project:cjs": "wireit",
"build:project:esm": "wireit",
"changelog": "composer install && composer exec -- changelogger",
"changelog": "XDEBUG_MODE=off composer install --quiet && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint src --fix",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
CI: liverage composer packages cache in lint monorepo job

View File

@ -40,7 +40,7 @@
"build:project": "pnpm --if-present '/^build:project:.*$/'",
"build:project:cjs": "wireit",
"build:project:esm": "wireit",
"changelog": "composer install && composer exec -- changelogger",
"changelog": "XDEBUG_MODE=off composer install --quiet && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint src --fix",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
CI: liverage composer packages cache in lint monorepo job

View File

@ -37,7 +37,7 @@
"build:project:bundle": "wireit",
"build:project:cjs": "wireit",
"build:project:esm": "wireit",
"changelog": "composer install && composer exec -- changelogger",
"changelog": "XDEBUG_MODE=off composer install --quiet && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint src --fix",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
CI: liverage composer packages cache in lint monorepo job

View File

@ -137,7 +137,7 @@
"build:project:bundle": "wireit",
"build:project:cjs": "wireit",
"build:project:esm": "wireit",
"changelog": "composer install && composer exec -- changelogger",
"changelog": "XDEBUG_MODE=off composer install --quiet && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint src --fix",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
CI: liverage composer packages cache in lint monorepo job

View File

@ -34,7 +34,7 @@
"build:project": "pnpm --if-present '/^build:project:.*$/'",
"build:project:cjs": "wireit",
"build:project:esm": "wireit",
"changelog": "composer install && composer exec -- changelogger",
"changelog": "XDEBUG_MODE=off composer install --quiet && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint src --fix",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
CI: liverage composer packages cache in lint monorepo job

View File

@ -41,7 +41,7 @@
"build:project": "pnpm --if-present '/^build:project:.*$/'",
"build:project:cjs": "wireit",
"build:project:esm": "wireit",
"changelog": "composer install && composer exec -- changelogger",
"changelog": "XDEBUG_MODE=off composer install --quiet && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint src --fix",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
CI: liverage composer packages cache in lint monorepo job

View File

@ -3,7 +3,7 @@
"description": "Remote specs testing suite",
"main": "index.js",
"scripts": {
"changelog": "composer install && composer exec -- changelogger"
"changelog": "XDEBUG_MODE=off composer install --quiet && composer exec -- changelogger"
},
"license": "GPL-3.0-or-later",
"dependencies": {