|
49 | 49 | outputs:
|
50 | 50 | docs-only: ${{ steps.docs-change.outputs.DOCS_ONLY != 'false' }}
|
51 | 51 | is-release: ${{ steps.is-release.outputs.IS_RELEASE == 'true' }}
|
| 52 | + rspack: >- |
| 53 | + ${{ |
| 54 | + github.event_name == 'pull_request' && |
| 55 | + contains(github.event.pull_request.labels.*.name, 'Rspack') |
| 56 | + }} |
52 | 57 |
|
53 | 58 | build-native:
|
54 | 59 | name: build-native
|
@@ -338,6 +343,124 @@ jobs:
|
338 | 343 | stepName: 'test-turbopack-production-integration-${{ matrix.group }}'
|
339 | 344 | secrets: inherit
|
340 | 345 |
|
| 346 | + test-rspack-dev: |
| 347 | + name: test rspack dev |
| 348 | + needs: ['optimize-ci', 'changes', 'build-next', 'build-native'] |
| 349 | + if: ${{ needs.optimize-ci.outputs.skip == 'false' && needs.changes.outputs.docs-only == 'false' && needs.changes.outputs.rspack == 'true' }} |
| 350 | + strategy: |
| 351 | + fail-fast: false |
| 352 | + matrix: |
| 353 | + group: [1/5, 2/5, 3/5, 4/5, 5/5] |
| 354 | + uses: ./.github/workflows/build_reusable.yml |
| 355 | + with: |
| 356 | + afterBuild: | |
| 357 | + export NEXT_EXTERNAL_TESTS_FILTERS="$(pwd)/test/rspack-dev-tests-manifest.json" |
| 358 | + export NEXT_TEST_MODE=dev |
| 359 | +
|
| 360 | + # rspack flags |
| 361 | + export NEXT_RSPACK=1 |
| 362 | + export NEXT_TEST_USE_RSPACK=1 |
| 363 | +
|
| 364 | + # HACK: Despite the name, this environment variable is only used to gate |
| 365 | + # tests, so it's applicable to rspack |
| 366 | + export TURBOPACK_DEV=1 |
| 367 | +
|
| 368 | + node run-tests.js \ |
| 369 | + --test-pattern '^(test\/(development|e2e))/.*\.test\.(js|jsx|ts|tsx)$' \ |
| 370 | + --timings \ |
| 371 | + -g ${{ matrix.group }} |
| 372 | + stepName: 'test-rspack-dev-react-${{ matrix.react }}-${{ matrix.group }}' |
| 373 | + secrets: inherit |
| 374 | + |
| 375 | + test-rspack-integration: |
| 376 | + name: test rspack development integration |
| 377 | + needs: ['optimize-ci', 'changes', 'build-next', 'build-native'] |
| 378 | + if: ${{ needs.optimize-ci.outputs.skip == 'false' && needs.changes.outputs.docs-only == 'false' && needs.changes.outputs.rspack == 'true' }} |
| 379 | + strategy: |
| 380 | + fail-fast: false |
| 381 | + matrix: |
| 382 | + group: [1/6, 2/6, 3/6, 4/6, 5/6, 6/6] |
| 383 | + uses: ./.github/workflows/build_reusable.yml |
| 384 | + with: |
| 385 | + nodeVersion: 18.18.2 |
| 386 | + afterBuild: | |
| 387 | + export NEXT_EXTERNAL_TESTS_FILTERS="$(pwd)/test/rspack-dev-tests-manifest.json" |
| 388 | +
|
| 389 | + # rspack flags |
| 390 | + export NEXT_RSPACK=1 |
| 391 | + export NEXT_TEST_USE_RSPACK=1 |
| 392 | +
|
| 393 | + # HACK: Despite the name, this environment variable is only used to gate |
| 394 | + # tests, so it's applicable to rspack |
| 395 | + export TURBOPACK_DEV=1 |
| 396 | +
|
| 397 | + node run-tests.js \ |
| 398 | + --timings \ |
| 399 | + -g ${{ matrix.group }} \ |
| 400 | + --type integration |
| 401 | + stepName: 'test-rspack-integration-react-${{ matrix.react }}-${{ matrix.group }}' |
| 402 | + secrets: inherit |
| 403 | + |
| 404 | + test-rspack-production: |
| 405 | + name: test rspack production |
| 406 | + needs: ['optimize-ci', 'changes', 'build-next', 'build-native'] |
| 407 | + if: ${{ needs.optimize-ci.outputs.skip == 'false' && needs.changes.outputs.docs-only == 'false' && needs.changes.outputs.rspack == 'true' }} |
| 408 | + strategy: |
| 409 | + fail-fast: false |
| 410 | + matrix: |
| 411 | + exclude: |
| 412 | + # Excluding React 18 tests unless on `canary` branch until budget is approved. |
| 413 | + - react: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'run-react-18-tests') && '18.3.1' }} |
| 414 | + group: [1/7, 2/7, 3/7, 4/7, 5/7, 6/7, 7/7] |
| 415 | + # Empty value uses default |
| 416 | + uses: ./.github/workflows/build_reusable.yml |
| 417 | + with: |
| 418 | + nodeVersion: 18.18.2 |
| 419 | + afterBuild: | |
| 420 | + export NEXT_EXTERNAL_TESTS_FILTERS="$(pwd)/test/rspack-build-tests-manifest.json" |
| 421 | + export NEXT_TEST_MODE=start |
| 422 | +
|
| 423 | + # rspack flags |
| 424 | + export NEXT_RSPACK=1 |
| 425 | + export NEXT_TEST_USE_RSPACK=1 |
| 426 | +
|
| 427 | + # HACK: Despite the name, this environment variable is only used to gate |
| 428 | + # tests, so it's applicable to rspack |
| 429 | + export TURBOPACK_BUILD=1 |
| 430 | +
|
| 431 | + node run-tests.js --timings -g ${{ matrix.group }} --type production |
| 432 | + stepName: 'test-rspack-production-react-${{ matrix.react }}-${{ matrix.group }}' |
| 433 | + secrets: inherit |
| 434 | + |
| 435 | + test-rspack-production-integration: |
| 436 | + name: test rspack production integration |
| 437 | + needs: ['optimize-ci', 'changes', 'build-next', 'build-native'] |
| 438 | + if: ${{ needs.optimize-ci.outputs.skip == 'false' && needs.changes.outputs.docs-only == 'false' && needs.changes.outputs.rspack == 'true' }} |
| 439 | + strategy: |
| 440 | + fail-fast: false |
| 441 | + matrix: |
| 442 | + group: [1/7, 2/7, 3/7, 4/7, 5/7, 6/7, 7/7] |
| 443 | + uses: ./.github/workflows/build_reusable.yml |
| 444 | + with: |
| 445 | + nodeVersion: 18.18.2 |
| 446 | + afterBuild: | |
| 447 | + export NEXT_EXTERNAL_TESTS_FILTERS="$(pwd)/test/rspack-build-tests-manifest.json" |
| 448 | +
|
| 449 | + # rspack flags |
| 450 | + export NEXT_RSPACK=1 |
| 451 | + export NEXT_TEST_USE_RSPACK=1 |
| 452 | +
|
| 453 | + # HACK: Despite the name, this environment variable is only used to gate |
| 454 | + # tests, so it's applicable to rspack |
| 455 | + export TURBOPACK_BUILD=1 |
| 456 | +
|
| 457 | + node run-tests.js \ |
| 458 | + --timings \ |
| 459 | + -g ${{ matrix.group }} \ |
| 460 | + --type integration |
| 461 | + stepName: 'test-rspack-production-integration-${{ matrix.group }}' |
| 462 | + secrets: inherit |
| 463 | + |
341 | 464 | test-next-swc-wasm:
|
342 | 465 | name: test next-swc wasm
|
343 | 466 | needs: ['optimize-ci', 'changes', 'build-next']
|
|
0 commit comments