@@ -105,45 +105,6 @@ jobs:
105
105
# `job_build` can't see `job_install_deps` and what it returned)
106
106
dependency_cache_key : ${{ needs.job_install_deps.outputs.dependency_cache_key }}
107
107
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
-
147
108
job_size_check :
148
109
name : Size Check
149
110
needs : job_build
@@ -295,6 +256,8 @@ jobs:
295
256
NODE_VERSION : ${{ matrix.node }}
296
257
run : |
297
258
[[ $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
298
261
yarn test-ci
299
262
- name : Compute test coverage
300
263
uses : codecov/codecov-action@v1
@@ -534,7 +497,7 @@ jobs:
534
497
535
498
job_unit_test_sucrase :
536
499
name : Sucrase Test (Node ${{ matrix.node }})
537
- needs : job_build_with_sucrase
500
+ needs : job_build
538
501
continue-on-error : true
539
502
timeout-minutes : 30
540
503
runs-on : ubuntu-latest
@@ -554,24 +517,26 @@ jobs:
554
517
uses : actions/cache@v2
555
518
with :
556
519
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 }}
558
521
- name : Check build cache
559
522
uses : actions/cache@v2
560
523
with :
561
524
path : ${{ env.CACHED_BUILD_PATHS }}
562
- key : ${{ env.BUILD_CACHE_KEY }}-sucrase
525
+ key : ${{ env.BUILD_CACHE_KEY }}
563
526
- name : Run tests
564
527
env :
565
528
NODE_VERSION : ${{ matrix.node }}
529
+ SUCRASE : true
566
530
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
568
533
yarn test-ci
569
534
- name : Compute test coverage
570
535
uses : codecov/codecov-action@v1
571
536
572
537
job_nextjs_integration_test_sucrase :
573
538
name : Sucrase Test @sentry/nextjs on (Node ${{ matrix.node }})
574
- needs : job_build_with_sucrase
539
+ needs : job_build
575
540
continue-on-error : true
576
541
timeout-minutes : 30
577
542
runs-on : ubuntu-latest
@@ -591,24 +556,25 @@ jobs:
591
556
uses : actions/cache@v2
592
557
with :
593
558
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 }}
595
560
- name : Check build cache
596
561
uses : actions/cache@v2
597
562
with :
598
563
path : ${{ env.CACHED_BUILD_PATHS }}
599
- key : ${{ env.BUILD_CACHE_KEY }}-sucrase
564
+ key : ${{ env.BUILD_CACHE_KEY }}
600
565
- name : Run tests
601
566
env :
602
567
NODE_VERSION : ${{ matrix.node }}
603
568
run : |
569
+ yarn ts-node scripts/sucrase-test-hack.ts
604
570
cd packages/nextjs
605
571
yarn test:integration
606
572
607
573
# Ember tests are separate from the rest because they are the slowest part of the test suite, and making them a
608
574
# separate job allows them to run in parallel with the other tests.
609
575
job_ember_tests_sucrase :
610
576
name : Sucrase Test @sentry/ember
611
- needs : job_build_with_sucrase
577
+ needs : job_build
612
578
continue-on-error : true
613
579
timeout-minutes : 30
614
580
runs-on : ubuntu-latest
@@ -634,20 +600,22 @@ jobs:
634
600
uses : actions/cache@v2
635
601
with :
636
602
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 }}
638
604
- name : Check build cache
639
605
uses : actions/cache@v2
640
606
with :
641
607
path : ${{ env.CACHED_BUILD_PATHS }}
642
- key : ${{ env.BUILD_CACHE_KEY }}-sucrase
608
+ key : ${{ env.BUILD_CACHE_KEY }}
643
609
- 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
645
613
- name : Compute test coverage
646
614
uses : codecov/codecov-action@v1
647
615
648
616
job_browser_playwright_tests_sucrase :
649
617
name : Sucrase Playwright - ${{ (matrix.tracing_only && 'Browser + Tracing') || 'Browser' }} (${{ matrix.bundle }})
650
- needs : job_build_with_sucrase
618
+ needs : job_build
651
619
runs-on : ubuntu-latest
652
620
strategy :
653
621
matrix :
@@ -677,24 +645,25 @@ jobs:
677
645
uses : actions/cache@v2
678
646
with :
679
647
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 }}
681
649
- name : Check build cache
682
650
uses : actions/cache@v2
683
651
with :
684
652
path : ${{ env.CACHED_BUILD_PATHS }}
685
- key : ${{ env.BUILD_CACHE_KEY }}-sucrase
653
+ key : ${{ env.BUILD_CACHE_KEY }}
686
654
- name : Run Playwright tests
687
655
env :
688
656
PW_BUNDLE : ${{ matrix.bundle }}
689
657
PW_TRACING_ONLY : ${{ matrix.tracing_only }}
690
658
run : |
659
+ yarn ts-node scripts/sucrase-test-hack.ts
691
660
cd packages/integration-tests
692
661
yarn run playwright install-deps webkit
693
662
yarn test:ci
694
663
695
664
job_browser_integration_tests_sucrase :
696
665
name : Sucrase Old Browser Integration Tests (${{ matrix.browser }})
697
- needs : job_build_with_sucrase
666
+ needs : job_build
698
667
runs-on : ubuntu-latest
699
668
timeout-minutes : 10
700
669
continue-on-error : true
@@ -715,23 +684,24 @@ jobs:
715
684
uses : actions/cache@v2
716
685
with :
717
686
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 }}
719
688
- name : Check build cache
720
689
uses : actions/cache@v2
721
690
with :
722
691
path : ${{ env.CACHED_BUILD_PATHS }}
723
- key : ${{ env.BUILD_CACHE_KEY }}-sucrase
692
+ key : ${{ env.BUILD_CACHE_KEY }}
724
693
- name : Run integration tests
725
694
env :
726
695
KARMA_BROWSER : ${{ matrix.browser }}
727
696
run : |
697
+ yarn ts-node scripts/sucrase-test-hack.ts
728
698
cd packages/browser
729
699
[[ $KARMA_BROWSER == WebkitHeadless ]] && yarn run playwright install-deps webkit
730
700
yarn test:integration
731
701
732
702
job_browser_build_tests_sucrase :
733
703
name : Sucrase Browser Build Tests
734
- needs : job_build_with_sucrase
704
+ needs : job_build
735
705
runs-on : ubuntu-latest
736
706
timeout-minutes : 5
737
707
continue-on-error : true
@@ -748,14 +718,15 @@ jobs:
748
718
uses : actions/cache@v2
749
719
with :
750
720
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 }}
752
722
- name : Check build cache
753
723
uses : actions/cache@v2
754
724
with :
755
725
path : ${{ env.CACHED_BUILD_PATHS }}
756
- key : ${{ env.BUILD_CACHE_KEY }}-sucrase
726
+ key : ${{ env.BUILD_CACHE_KEY }}
757
727
- name : Run browser build tests
758
728
run : |
729
+ yarn ts-node scripts/sucrase-test-hack.ts
759
730
cd packages/browser
760
731
yarn test:package
761
732
- name : Run utils build tests
@@ -765,7 +736,7 @@ jobs:
765
736
766
737
job_node_integration_tests_sucrase :
767
738
name : Sucrase Node SDK Integration Tests (${{ matrix.node }})
768
- needs : job_build_with_sucrase
739
+ needs : job_build
769
740
runs-on : ubuntu-latest
770
741
timeout-minutes : 10
771
742
continue-on-error : true
@@ -785,15 +756,16 @@ jobs:
785
756
uses : actions/cache@v2
786
757
with :
787
758
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 }}
789
760
- name : Check build cache
790
761
uses : actions/cache@v2
791
762
with :
792
763
path : ${{ env.CACHED_BUILD_PATHS }}
793
- key : ${{ env.BUILD_CACHE_KEY }}-sucrase
764
+ key : ${{ env.BUILD_CACHE_KEY }}
794
765
- name : Run integration tests
795
766
env :
796
767
NODE_VERSION : ${{ matrix.node }}
797
768
run : |
769
+ yarn ts-node scripts/sucrase-test-hack.ts
798
770
cd packages/node-integration-tests
799
771
yarn test
0 commit comments