@@ -105,45 +105,6 @@ jobs:
105105 # `job_build` can't see `job_install_deps` and what it returned)
106106 dependency_cache_key : ${{ needs.job_install_deps.outputs.dependency_cache_key }}
107107
108- # This isn't a full `yarn build` using sucrase - it's just the cache from the normal build, with `build/cjs` and
109- # `build/esm` overwritten by sucrase. This way we don't need to worry about all of the other random stuff which
110- # packages build, because it will already be there.
111- job_build_with_sucrase :
112- name : Sucrase Build
113- needs : [job_install_deps, job_build]
114- runs-on : ubuntu-latest
115- timeout-minutes : 20
116- steps :
117- - name : Check out current commit (${{ env.HEAD_COMMIT }})
118- uses : actions/checkout@v2
119- with :
120- ref : ${{ env.HEAD_COMMIT }}
121- - name : Set up Node
122- uses : actions/setup-node@v1
123- - name : Check dependency cache
124- uses : actions/cache@v2
125- with :
126- path : ${{ env.CACHED_DEPENDENCY_PATHS }}
127- key : ${{ needs.job_install_deps.outputs.dependency_cache_key }}
128- - name : Check tsc build cache
129- uses : actions/cache@v2
130- with :
131- path : ${{ env.CACHED_BUILD_PATHS }}
132- key : ${{ env.BUILD_CACHE_KEY }}
133- - name : Check sucrase build cache
134- uses : actions/cache@v2
135- id : cache_built_sucrase_packages
136- with :
137- path : ${{ env.CACHED_BUILD_PATHS }}
138- key : ${{ env.BUILD_CACHE_KEY }}-sucrase
139- - name : Build packages with sucrase
140- if : steps.cache_built_sucrase_packages.outputs.cache-hit == ''
141- run : ' yarn build:rollup'
142- outputs :
143- # this needs to be passed on, because the `needs` context only looks at direct ancestors (so steps which depend on
144- # `job_build` can't see `job_install_deps` and what it returned)
145- dependency_cache_key : ${{ needs.job_install_deps.outputs.dependency_cache_key }}
146-
147108 job_size_check :
148109 name : Size Check
149110 needs : job_build
@@ -295,6 +256,8 @@ jobs:
295256 NODE_VERSION : ${{ matrix.node }}
296257 run : |
297258 [[ $NODE_VERSION == 8 ]] && yarn add --dev --ignore-engines --ignore-scripts --ignore-workspace-root-check [email protected] 259+ # TODO remove this when we switch to sucrase
260+ yarn ts-node scripts/sucrase-test-hack.ts
298261 yarn test-ci
299262 - name : Compute test coverage
300263 uses : codecov/codecov-action@v1
@@ -534,7 +497,7 @@ jobs:
534497
535498 job_unit_test_sucrase :
536499 name : Sucrase Test (Node ${{ matrix.node }})
537- needs : job_build_with_sucrase
500+ needs : job_build
538501 continue-on-error : true
539502 timeout-minutes : 30
540503 runs-on : ubuntu-latest
@@ -554,24 +517,26 @@ jobs:
554517 uses : actions/cache@v2
555518 with :
556519 path : ${{ env.CACHED_DEPENDENCY_PATHS }}
557- key : ${{ needs.job_build_with_sucrase .outputs.dependency_cache_key }}
520+ key : ${{ needs.job_build .outputs.dependency_cache_key }}
558521 - name : Check build cache
559522 uses : actions/cache@v2
560523 with :
561524 path : ${{ env.CACHED_BUILD_PATHS }}
562- key : ${{ env.BUILD_CACHE_KEY }}-sucrase
525+ key : ${{ env.BUILD_CACHE_KEY }}
563526 - name : Run tests
564527 env :
565528 NODE_VERSION : ${{ matrix.node }}
529+ SUCRASE : true
566530 run : |
567- [[ $NODE_VERSION == 8 ]] && yarn add --dev --ignore-engines --ignore-scripts --ignore-workspace-root-check [email protected] 531+ [[ $NODE_VERSION == 8 ]] && yarn add --dev --ignore-engines --ignore-scripts --ignore-workspace-root-check [email protected] [email protected] @rollup/[email protected] [email protected] [email protected] 532+ yarn ts-node scripts/sucrase-test-hack.ts
568533 yarn test-ci
569534 - name : Compute test coverage
570535 uses : codecov/codecov-action@v1
571536
572537 job_nextjs_integration_test_sucrase :
573538 name : Sucrase Test @sentry/nextjs on (Node ${{ matrix.node }})
574- needs : job_build_with_sucrase
539+ needs : job_build
575540 continue-on-error : true
576541 timeout-minutes : 30
577542 runs-on : ubuntu-latest
@@ -591,24 +556,25 @@ jobs:
591556 uses : actions/cache@v2
592557 with :
593558 path : ${{ env.CACHED_DEPENDENCY_PATHS }}
594- key : ${{ needs.job_build_with_sucrase .outputs.dependency_cache_key }}
559+ key : ${{ needs.job_build .outputs.dependency_cache_key }}
595560 - name : Check build cache
596561 uses : actions/cache@v2
597562 with :
598563 path : ${{ env.CACHED_BUILD_PATHS }}
599- key : ${{ env.BUILD_CACHE_KEY }}-sucrase
564+ key : ${{ env.BUILD_CACHE_KEY }}
600565 - name : Run tests
601566 env :
602567 NODE_VERSION : ${{ matrix.node }}
603568 run : |
569+ yarn ts-node scripts/sucrase-test-hack.ts
604570 cd packages/nextjs
605571 yarn test:integration
606572
607573 # Ember tests are separate from the rest because they are the slowest part of the test suite, and making them a
608574 # separate job allows them to run in parallel with the other tests.
609575 job_ember_tests_sucrase :
610576 name : Sucrase Test @sentry/ember
611- needs : job_build_with_sucrase
577+ needs : job_build
612578 continue-on-error : true
613579 timeout-minutes : 30
614580 runs-on : ubuntu-latest
@@ -634,20 +600,22 @@ jobs:
634600 uses : actions/cache@v2
635601 with :
636602 path : ${{ env.CACHED_DEPENDENCY_PATHS }}
637- key : ${{ needs.job_build_with_sucrase .outputs.dependency_cache_key }}
603+ key : ${{ needs.job_build .outputs.dependency_cache_key }}
638604 - name : Check build cache
639605 uses : actions/cache@v2
640606 with :
641607 path : ${{ env.CACHED_BUILD_PATHS }}
642- key : ${{ env.BUILD_CACHE_KEY }}-sucrase
608+ key : ${{ env.BUILD_CACHE_KEY }}
643609 - name : Run Ember tests
644- run : yarn test --scope=@sentry/ember
610+ run : |
611+ yarn ts-node scripts/sucrase-test-hack.ts
612+ yarn test --scope=@sentry/ember
645613 - name : Compute test coverage
646614 uses : codecov/codecov-action@v1
647615
648616 job_browser_playwright_tests_sucrase :
649617 name : Sucrase Playwright - ${{ (matrix.tracing_only && 'Browser + Tracing') || 'Browser' }} (${{ matrix.bundle }})
650- needs : job_build_with_sucrase
618+ needs : job_build
651619 runs-on : ubuntu-latest
652620 strategy :
653621 matrix :
@@ -677,24 +645,25 @@ jobs:
677645 uses : actions/cache@v2
678646 with :
679647 path : ${{ env.CACHED_DEPENDENCY_PATHS }}
680- key : ${{ needs.job_build_with_sucrase .outputs.dependency_cache_key }}
648+ key : ${{ needs.job_build .outputs.dependency_cache_key }}
681649 - name : Check build cache
682650 uses : actions/cache@v2
683651 with :
684652 path : ${{ env.CACHED_BUILD_PATHS }}
685- key : ${{ env.BUILD_CACHE_KEY }}-sucrase
653+ key : ${{ env.BUILD_CACHE_KEY }}
686654 - name : Run Playwright tests
687655 env :
688656 PW_BUNDLE : ${{ matrix.bundle }}
689657 PW_TRACING_ONLY : ${{ matrix.tracing_only }}
690658 run : |
659+ yarn ts-node scripts/sucrase-test-hack.ts
691660 cd packages/integration-tests
692661 yarn run playwright install-deps webkit
693662 yarn test:ci
694663
695664 job_browser_integration_tests_sucrase :
696665 name : Sucrase Old Browser Integration Tests (${{ matrix.browser }})
697- needs : job_build_with_sucrase
666+ needs : job_build
698667 runs-on : ubuntu-latest
699668 timeout-minutes : 10
700669 continue-on-error : true
@@ -715,23 +684,24 @@ jobs:
715684 uses : actions/cache@v2
716685 with :
717686 path : ${{ env.CACHED_DEPENDENCY_PATHS }}
718- key : ${{ needs.job_build_with_sucrase .outputs.dependency_cache_key }}
687+ key : ${{ needs.job_build .outputs.dependency_cache_key }}
719688 - name : Check build cache
720689 uses : actions/cache@v2
721690 with :
722691 path : ${{ env.CACHED_BUILD_PATHS }}
723- key : ${{ env.BUILD_CACHE_KEY }}-sucrase
692+ key : ${{ env.BUILD_CACHE_KEY }}
724693 - name : Run integration tests
725694 env :
726695 KARMA_BROWSER : ${{ matrix.browser }}
727696 run : |
697+ yarn ts-node scripts/sucrase-test-hack.ts
728698 cd packages/browser
729699 [[ $KARMA_BROWSER == WebkitHeadless ]] && yarn run playwright install-deps webkit
730700 yarn test:integration
731701
732702 job_browser_build_tests_sucrase :
733703 name : Sucrase Browser Build Tests
734- needs : job_build_with_sucrase
704+ needs : job_build
735705 runs-on : ubuntu-latest
736706 timeout-minutes : 5
737707 continue-on-error : true
@@ -748,14 +718,15 @@ jobs:
748718 uses : actions/cache@v2
749719 with :
750720 path : ${{ env.CACHED_DEPENDENCY_PATHS }}
751- key : ${{ needs.job_build_with_sucrase .outputs.dependency_cache_key }}
721+ key : ${{ needs.job_build .outputs.dependency_cache_key }}
752722 - name : Check build cache
753723 uses : actions/cache@v2
754724 with :
755725 path : ${{ env.CACHED_BUILD_PATHS }}
756- key : ${{ env.BUILD_CACHE_KEY }}-sucrase
726+ key : ${{ env.BUILD_CACHE_KEY }}
757727 - name : Run browser build tests
758728 run : |
729+ yarn ts-node scripts/sucrase-test-hack.ts
759730 cd packages/browser
760731 yarn test:package
761732 - name : Run utils build tests
@@ -765,7 +736,7 @@ jobs:
765736
766737 job_node_integration_tests_sucrase :
767738 name : Sucrase Node SDK Integration Tests (${{ matrix.node }})
768- needs : job_build_with_sucrase
739+ needs : job_build
769740 runs-on : ubuntu-latest
770741 timeout-minutes : 10
771742 continue-on-error : true
@@ -785,15 +756,16 @@ jobs:
785756 uses : actions/cache@v2
786757 with :
787758 path : ${{ env.CACHED_DEPENDENCY_PATHS }}
788- key : ${{ needs.job_build_with_sucrase .outputs.dependency_cache_key }}
759+ key : ${{ needs.job_build .outputs.dependency_cache_key }}
789760 - name : Check build cache
790761 uses : actions/cache@v2
791762 with :
792763 path : ${{ env.CACHED_BUILD_PATHS }}
793- key : ${{ env.BUILD_CACHE_KEY }}-sucrase
764+ key : ${{ env.BUILD_CACHE_KEY }}
794765 - name : Run integration tests
795766 env :
796767 NODE_VERSION : ${{ matrix.node }}
797768 run : |
769+ yarn ts-node scripts/sucrase-test-hack.ts
798770 cd packages/node-integration-tests
799771 yarn test
0 commit comments