Repository navigation
Test: Add public Vitest packages #82765
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
79632bf
Test: Add public Vitest packages
ciampo 037a398
Test: Reference Vitest package pull request in changelogs
ciampo 58f646d
Test: Register Vitest packages in labeler configuration
ciampo 3c85f6a
Vitest: Make Emotion transforms consumer-configured
ciampo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.