Skip to content
Merged
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: 0 additions & 8 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -334,14 +334,6 @@
- changed-files:
- any-glob-to-any-file: 'packages/eslint-plugin/**'

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

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

'[Tool] npm-package-json-lint config':
- changed-files:
- any-glob-to-any-file: 'packages/npm-package-json-lint-config/**'
Expand Down
28 changes: 6 additions & 22 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,31 +109,15 @@ jobs:
node-version: ${{ matrix.node }}

- name: Run build scripts
# It's not necessary to run the full build, since Jest can interpret
# source files with `babel-jest`. Some packages have their own custom
# It's not necessary to run the full build, since Vitest uses
# native Vite transforms. Some packages have their own custom
# build tasks, however. These must be run.
run: npm exec --no -- lerna run build

- name: Run the remaining Jest partition
env:
SHARD: ${{ matrix.shard }}
# Record the Node.js major as a custom flakiness environment
# dimension so flakiness.io keeps a separate history per Node
# version in the matrix.
FK_ENV_NODEJS: ${{ matrix.node }}
run: |
npm run test:unit -- \
--ci \
--maxWorkers="$(nproc)" \
--shard="$SHARD" \
--cacheDirectory="$HOME/.jest-cache" \
--passWithNoTests

- name: Run the migrated Vitest partition
- name: Run the Vitest Node and jsdom projects
env:
SHARD: ${{ matrix.shard }}
# Preserve the same Flakiness.io environment identity used
# by the Jest partition.
# Keep a separate Flakiness.io history for each Node.js major.
FK_ENV_NODEJS: ${{ matrix.node }}
run: |
npm run test:unit:vitest:shuffled -- \
Expand Down Expand Up @@ -207,8 +191,8 @@ jobs:
node-version: ${{ matrix.node }}

- name: Run build scripts
# It's not necessary to run the full build, since Jest can interpret
# source files with `babel-jest`. Some packages have their own custom
# It's not necessary to run the full build, since Vitest uses
# native Vite transforms. Some packages have their own custom
# build tasks, however. These must be run.
run: npm exec --no -- lerna run build

Expand Down
57 changes: 57 additions & 0 deletions .github/workflows/vitest-consumers.yml
Comment thread
ciampo marked this conversation as resolved.
Resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Pack the public test tooling and verify it in standalone consumer projects.
# Keep registry installs and consumer browser downloads scoped to tooling changes.
name: Vitest consumers

on:
pull_request:
paths:
- 'packages/scripts/**'
- 'packages/eslint-plugin/**'
- 'tools/validation/test-vitest-consumers.mjs'
- 'tools/validation/fixtures/vitest-consumer/**'
- 'package-lock.json'
- '.github/workflows/vitest-consumers.yml'
workflow_dispatch:

permissions: {}

jobs:
consumer:
name: Node.js ${{ matrix.node }} / Vite ${{ matrix.vite }}
runs-on: ubuntu-24.04
timeout-minutes: 20
permissions:
contents: read
strategy:
fail-fast: false
matrix:
# Exact versions cover the supported Node and Vite lower bounds.
node: ['22.22.2', '24.15.0', '26.0.0']
Comment thread
manzoorwanijk marked this conversation as resolved.
Resolved
vite: ['7.0.0', '8.0.0']
# Major ranges also catch new releases without manual pin updates.
include:
- node: '22'
vite: '^7'
- node: '24'
vite: '^8'
browser: true
- node: '26'
vite: '^8'
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: ${{ matrix.node }}
package-manager-cache: false
- name: Test isolated public tooling
env:
VITE_VERSION: ${{ matrix.vite }}
TEST_BROWSER: ${{ matrix.browser || false }}
run: |
args=(--vite="$VITE_VERSION")
if [ "$TEST_BROWSER" = "true" ]; then
args+=(--browser)
fi
node tools/validation/test-vitest-consumers.mjs "${args[@]}"
Loading
Loading