Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,14 @@
- changed-files:
- any-glob-to-any-file: 'packages/stylelint-config/**'

'[Tool] Vitest console':
- changed-files:
- any-glob-to-any-file: 'packages/vitest-console/**'

'[Tool] Vitest preset':
- changed-files:
- any-glob-to-any-file: 'packages/vitest-preset-default/**'

Comment on lines +365 to +372

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Observation: My validation changes in #76263 were effective in making sure that new packages are added to the mapping here, though I suppose it doesn't actually validate that the label actually exists, which might be a good follow-on enhancement.

It looks like @sirreal 's improvements in #81614 might help this.

'[Tool] WP Scripts':
- changed-files:
- any-glob-to-any-file: 'packages/scripts/**'
67 changes: 67 additions & 0 deletions .github/workflows/vitest-packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Vitest packages

on:
pull_request:
paths:
- 'packages/vitest-*/**'
- 'packages/jest-*/**'
- 'packages/scripts/**'
- 'packages/eslint-plugin/**'
- 'packages/wp-build/**'
- 'packages/style-runtime/**'
- 'test/unit/scripts/validate-vitest-package-consumer.mjs'
- 'test/unit/package.json'
- 'package-lock.json'
- '.github/workflows/vitest-packages.yml'
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
consumers:
name: Packed consumers (Node ${{ matrix.node }}, Vite ${{ matrix.vite }})
runs-on: ubuntu-24.04
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
node: ['22.12.0', '24', '26']
vite: ['7.3.6', '8.2.2']
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Install and build repository packages on the repository Node version
uses: ./.github/setup-node
with:
node-version: '24'

- run: npm run build

- name: Record the npm CLI for isolated installs
run: echo "VITEST_CONSUMER_NPM=$(command -v npm)" >> "$GITHUB_ENV"

- uses: ./.github/setup-playwright
with:
workspace: '@wordpress/unit-tests'
browsers: chromium

- name: Select the public consumer Node version
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: ${{ matrix.node }}
package-manager-cache: false

- name: Verify packed packages in isolated consumers
env:
npm_execpath: ${{ env.VITEST_CONSUMER_NPM }}
VITEST_CONSUMER_VITE: ${{ matrix.vite }}
# The unchanged wp-scripts engine range is narrower than the new preset's.
VITEST_CONSUMER_JEST: ${{ matrix.node == '24' && matrix.vite == '8.2.2' && '1' || '' }}
run: node test/unit/scripts/validate-vitest-package-consumer.mjs
12 changes: 12 additions & 0 deletions docs/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2879,6 +2879,18 @@
"markdown_source": "../packages/vips/README.md",
"parent": "packages"
},
{
"title": "@wordpress/vitest-console",
"slug": "packages-vitest-console",
"markdown_source": "../packages/vitest-console/README.md",
"parent": "packages"
},
{
"title": "@wordpress/vitest-preset-default",
"slug": "packages-vitest-preset-default",
"markdown_source": "../packages/vitest-preset-default/README.md",
"parent": "packages"
},
{
"title": "@wordpress/warning",
"slug": "packages-warning",
Expand Down
Loading
Loading