|
32 | 32 | CACHED_BUILD_PATHS: | |
33 | 33 | ${{ github.workspace }}/packages/*/build |
34 | 34 | ${{ github.workspace }}/packages/ember/*.d.ts |
35 | | - ${{ github.workspace }}/packages/ember/instance-initializers |
36 | 35 | ${{ github.workspace }}/packages/gatsby/*.d.ts |
37 | 36 | ${{ github.workspace }}/packages/core/src/version.ts |
38 | 37 | ${{ github.workspace }}/packages/serverless |
@@ -352,8 +351,39 @@ jobs: |
352 | 351 | ${{ github.workspace }}/packages/replay/build/bundles/** |
353 | 352 | ${{ github.workspace }}/packages/**/*.tgz |
354 | 353 |
|
355 | | - job_unit_test: |
356 | | - name: Test (Node ${{ matrix.node }}) |
| 354 | + job_browser_unit_tests: |
| 355 | + name: Browser Unit Tests |
| 356 | + needs: [job_get_metadata, job_build] |
| 357 | + timeout-minutes: 10 |
| 358 | + runs-on: ubuntu-latest |
| 359 | + steps: |
| 360 | + - name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }}) |
| 361 | + uses: actions/checkout@v3 |
| 362 | + with: |
| 363 | + ref: ${{ env.HEAD_COMMIT }} |
| 364 | + - name: Set up Node |
| 365 | + uses: actions/setup-node@v3 |
| 366 | + with: |
| 367 | + node-version: ${{ env.DEFAULT_NODE_VERSION }} |
| 368 | + - name: Check dependency cache |
| 369 | + uses: actions/cache@v3 |
| 370 | + with: |
| 371 | + path: ${{ env.CACHED_DEPENDENCY_PATHS }} |
| 372 | + key: ${{ needs.job_build.outputs.dependency_cache_key }} |
| 373 | + - name: Check build cache |
| 374 | + uses: actions/cache@v3 |
| 375 | + with: |
| 376 | + path: ${{ env.CACHED_BUILD_PATHS }} |
| 377 | + key: ${{ env.BUILD_CACHE_KEY }} |
| 378 | + - name: Run tests |
| 379 | + env: |
| 380 | + NODE_VERSION: 16 |
| 381 | + run: yarn test-ci-browser |
| 382 | + - name: Compute test coverage |
| 383 | + uses: codecov/codecov-action@v3 |
| 384 | + |
| 385 | + job_node_unit_tests: |
| 386 | + name: Node (${{ matrix.node }}) Unit Tests |
357 | 387 | needs: [job_get_metadata, job_build] |
358 | 388 | timeout-minutes: 30 |
359 | 389 | runs-on: ubuntu-20.04 |
@@ -385,12 +415,12 @@ jobs: |
385 | 415 | NODE_VERSION: ${{ matrix.node }} |
386 | 416 | run: | |
387 | 417 | [[ $NODE_VERSION == 8 ]] && yarn add --dev --ignore-engines --ignore-scripts --ignore-workspace-root-check [email protected] |
388 | | - yarn test-ci |
| 418 | + yarn test-ci-node |
389 | 419 | - name: Compute test coverage |
390 | 420 | uses: codecov/codecov-action@v3 |
391 | 421 |
|
392 | 422 | job_nextjs_integration_test: |
393 | | - name: Test @sentry/nextjs on (Node ${{ matrix.node }}) |
| 423 | + name: Nextjs (Node ${{ matrix.node }}) Tests |
394 | 424 | needs: [job_get_metadata, job_build] |
395 | 425 | if: needs.job_get_metadata.outputs.changed_nextjs == 'true' || github.event_name != 'pull_request' |
396 | 426 | timeout-minutes: 30 |
@@ -428,7 +458,7 @@ jobs: |
428 | 458 | # Ember tests are separate from the rest because they are the slowest part of the test suite, and making them a |
429 | 459 | # separate job allows them to run in parallel with the other tests. |
430 | 460 | job_ember_tests: |
431 | | - name: Test @sentry/ember |
| 461 | + name: Ember (${{ matrix.scenario }}) Tests |
432 | 462 | needs: [job_get_metadata, job_build] |
433 | 463 | if: needs.job_get_metadata.outputs.changed_ember == 'true' || github.event_name != 'pull_request' |
434 | 464 | timeout-minutes: 10 |
@@ -470,7 +500,7 @@ jobs: |
470 | 500 | uses: codecov/codecov-action@v3 |
471 | 501 |
|
472 | 502 | job_browser_playwright_tests: |
473 | | - name: Playwright - ${{ (matrix.tracing_only && 'Browser + Tracing') || 'Browser' }} (${{ matrix.bundle }}) |
| 503 | + name: Playwright (${{ matrix.bundle }})${{ (matrix.tracing_only && ' tracing only') || '' }} Tests |
474 | 504 | needs: [job_get_metadata, job_build] |
475 | 505 | if: needs.job_get_metadata.outputs.changed_browser_integration == 'true' || github.event_name != 'pull_request' |
476 | 506 | runs-on: ubuntu-20.04 |
@@ -520,7 +550,7 @@ jobs: |
520 | 550 | yarn test:ci |
521 | 551 |
|
522 | 552 | job_browser_integration_tests: |
523 | | - name: Old Browser Integration Tests (${{ matrix.browser }}) |
| 553 | + name: Browser (${{ matrix.browser }}) Tests |
524 | 554 | needs: [job_get_metadata, job_build] |
525 | 555 | if: needs.job_get_metadata.outputs.changed_browser == 'true' || github.event_name != 'pull_request' |
526 | 556 | runs-on: ubuntu-20.04 |
@@ -589,7 +619,7 @@ jobs: |
589 | 619 | yarn test:package |
590 | 620 |
|
591 | 621 | job_node_integration_tests: |
592 | | - name: Node SDK Integration Tests (${{ matrix.node }}) |
| 622 | + name: Node (${{ matrix.node }}) Integration Tests |
593 | 623 | needs: [job_get_metadata, job_build] |
594 | 624 | if: needs.job_get_metadata.outputs.changed_node == 'true' || github.event_name != 'pull_request' |
595 | 625 | runs-on: ubuntu-20.04 |
@@ -625,7 +655,7 @@ jobs: |
625 | 655 | yarn test |
626 | 656 |
|
627 | 657 | job_remix_integration_tests: |
628 | | - name: Remix SDK Integration Tests (${{ matrix.node }}) |
| 658 | + name: Remix (Node ${{ matrix.node }}) Tests |
629 | 659 | needs: [job_get_metadata, job_build] |
630 | 660 | if: needs.job_get_metadata.outputs.changed_remix == 'true' || github.event_name != 'pull_request' |
631 | 661 | runs-on: ubuntu-20.04 |
@@ -708,7 +738,8 @@ jobs: |
708 | 738 | [ |
709 | 739 | job_build, |
710 | 740 | job_browser_build_tests, |
711 | | - job_unit_test, |
| 741 | + job_browser_unit_tests, |
| 742 | + job_node_unit_tests, |
712 | 743 | job_nextjs_integration_test, |
713 | 744 | job_node_integration_tests, |
714 | 745 | job_browser_playwright_tests, |
|
0 commit comments