@@ -87,10 +87,12 @@ jobs:
8787 id : changed
8888 with :
8989 filters : |
90+ workflow: &workflow
91+ - '.github/**'
9092 shared: &shared
93+ - *workflow
9194 - '*.{js,ts,json,yml,lock}'
9295 - 'CHANGELOG.md'
93- - '.github/**'
9496 - 'jest/**'
9597 - 'scripts/**'
9698 - 'packages/core/**'
@@ -115,6 +117,11 @@ jobs:
115117 - *shared
116118 - *browser
117119 - 'packages/ember/**'
120+ node:
121+ - *shared
122+ - 'packages/node/**'
123+ - 'packages/node-experimental/**'
124+ - 'dev-packages/node-integration-tests/**'
118125 nextjs:
119126 - *shared
120127 - *browser
@@ -127,18 +134,16 @@ jobs:
127134 - 'packages/remix/**'
128135 - 'packages/node/**'
129136 - 'packages/react/**'
130- node:
131- - *shared
132- - 'packages/node/**'
133- - 'packages/node-experimental/**'
134- - 'packages/profiling-node/**'
135- - 'dev-packages/node-integration-tests/**'
136137 profiling_node:
137138 - *shared
138139 - 'packages/node/**'
140+ - 'packages/node-experimental/**'
139141 - 'packages/profiling-node/**'
142+ - 'dev-packages/e2e-tests/test-applications/node-profiling/**'
140143 profiling_node_bindings:
141- - 'packages/profiling-node/bindings/**'
144+ - *workflow
145+ - 'packages/profiling-node/**'
146+ - 'dev-packages/e2e-tests/test-applications/node-profiling/**'
142147 deno:
143148 - *shared
144149 - *browser
@@ -554,7 +559,7 @@ jobs:
554559 job_profiling_node_unit_tests :
555560 name : Node Profiling Unit Tests
556561 needs : [job_get_metadata, job_build]
557- if : needs.job_get_metadata.outputs.changed_node =='true' || needs.job_get_metadata.outputs.changed_profiling_node == 'true' || github.event_name != 'pull_request'
562+ if : needs.job_get_metadata.outputs.changed_node == 'true' || needs.job_get_metadata.outputs.changed_profiling_node == 'true' || github.event_name != 'pull_request'
558563 runs-on : ubuntu-latest
559564 timeout-minutes : 10
560565 steps :
@@ -1064,7 +1069,6 @@ jobs:
10641069 ' node-experimental-fastify-app' ,
10651070 ' node-hapi-app' ,
10661071 ' node-exports-test-app' ,
1067- ' node-profiling' ,
10681072 ' vue-3'
10691073 ]
10701074 build-command :
@@ -1086,7 +1090,6 @@ jobs:
10861090 - test-application : ' nextjs-app-dir'
10871091 build-command : ' test:build-13'
10881092 label : ' nextjs-app-dir (next@13)'
1089-
10901093 steps :
10911094 - name : Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
10921095 uses : actions/checkout@v4
@@ -1107,34 +1110,6 @@ jobs:
11071110 env :
11081111 DEPENDENCY_CACHE_KEY : ${{ needs.job_build.outputs.dependency_cache_key }}
11091112
1110- # Rebuild profiling by compiling TS and pull the precompiled binary artifacts
1111- - name : Build Profiling Node
1112- if : |
1113- (needs.job_get_metadata.outputs.changed_profiling_node_bindings == 'true') ||
1114- (needs.job_get_metadata.outputs.is_release == 'true') ||
1115- (github.event_name != 'pull_request')
1116- run : yarn lerna run build:lib --scope @sentry/profiling-node
1117-
1118- - name : Extract Profiling Node Prebuilt Binaries
1119- # @TODO: v4 breaks convenient merging of same name artifacts
1120- # https://github.com/actions/upload-artifact/issues/478
1121- if : |
1122- (needs.job_get_metadata.outputs.changed_profiling_node_bindings == 'true') ||
1123- (github.event_name != 'pull_request')
1124- uses : actions/download-artifact@v3
1125- with :
1126- name : profiling-node-binaries-${{ github.sha }}
1127- path : ${{ github.workspace }}/packages/profiling-node/lib/
1128-
1129- - name : Build Profiling tarball
1130- run : yarn build:tarball --scope @sentry/profiling-node
1131-
1132- - name : Install esbuild
1133- if : ${{ matrix.test-application == 'node-profiling' }}
1134- working-directory : dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}
1135- 1136- # End rebuild profiling
1137-
11381113 - name : Restore tarball cache
11391114 uses : actions/cache/restore@v4
11401115 with :
@@ -1176,6 +1151,93 @@ jobs:
11761151 directory : dist
11771152 workingDirectory : dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}
11781153
1154+ job_profiling_e2e_tests :
1155+ name : E2E ${{ matrix.label || matrix.test-application }} Test
1156+ # We only run E2E tests for non-fork PRs because the E2E tests require secrets to work and they can't be accessed from forks
1157+ # Dependabot PRs sadly also don't have access to secrets, so we skip them as well
1158+ # We need to add the `always()` check here because the previous step has this as well :(
1159+ # See: https://github.com/actions/runner/issues/2205
1160+ if :
1161+ # Only run profiling e2e tests if profiling node bindings have changed
1162+ always() && needs.job_e2e_prepare.result == 'success' &&
1163+ (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) &&
1164+ github.actor != 'dependabot[bot]' && (
1165+ (needs.job_get_metadata.outputs.changed_profiling_node_bindings == 'true') ||
1166+ (needs.job_get_metadata.outputs.is_release == 'true') ||
1167+ (github.event_name != 'pull_request')
1168+ )
1169+ needs : [job_get_metadata, job_build, job_e2e_prepare]
1170+ runs-on : ubuntu-20.04
1171+ timeout-minutes : 10
1172+ env :
1173+ E2E_TEST_AUTH_TOKEN : ${{ secrets.E2E_TEST_AUTH_TOKEN }}
1174+ E2E_TEST_DSN : ${{ secrets.E2E_TEST_DSN }}
1175+ E2E_TEST_SENTRY_ORG_SLUG : ' sentry-javascript-sdks'
1176+ E2E_TEST_SENTRY_TEST_PROJECT : ' sentry-javascript-e2e-tests'
1177+ strategy :
1178+ fail-fast : false
1179+ matrix :
1180+ test-application : ['node-profiling']
1181+ build-command :
1182+ - false
1183+ label :
1184+ - false
1185+ steps :
1186+ - name : Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
1187+ uses : actions/checkout@v4
1188+ with :
1189+ ref : ${{ env.HEAD_COMMIT }}
1190+ - uses : pnpm/action-setup@v2
1191+ with :
1192+ version : 8.3.1
1193+ - name : Set up Node
1194+ uses : actions/setup-node@v4
1195+ with :
1196+ node-version-file : ' dev-packages/e2e-tests/package.json'
1197+ - name : Restore caches
1198+ uses : ./.github/actions/restore-cache
1199+ env :
1200+ DEPENDENCY_CACHE_KEY : ${{ needs.job_build.outputs.dependency_cache_key }}
1201+ - name : Build Profiling Node
1202+ run : yarn lerna run build:lib --scope @sentry/profiling-node
1203+ - name : Extract Profiling Node Prebuilt Binaries
1204+ uses : actions/download-artifact@v3
1205+ with :
1206+ name : profiling-node-binaries-${{ github.sha }}
1207+ path : ${{ github.workspace }}/packages/profiling-node/lib/
1208+ - name : Build Profiling tarball
1209+ run : yarn build:tarball --scope @sentry/profiling-node
1210+ - name : Restore tarball cache
1211+ uses : actions/cache/restore@v4
1212+ with :
1213+ path : ${{ github.workspace }}/packages/*/*.tgz
1214+ key : ${{ env.BUILD_PROFILING_NODE_CACHE_TARBALL_KEY }}
1215+
1216+ - name : Get node version
1217+ id : versions
1218+ run : |
1219+ echo "echo node=$(jq -r '.volta.node' dev-packages/e2e-tests/package.json)" >> $GITHUB_OUTPUT
1220+
1221+ - name : Validate Verdaccio
1222+ run : yarn test:validate
1223+ working-directory : dev-packages/e2e-tests
1224+
1225+ - name : Prepare Verdaccio
1226+ run : yarn test:prepare
1227+ working-directory : dev-packages/e2e-tests
1228+ env :
1229+ E2E_TEST_PUBLISH_SCRIPT_NODE_VERSION : ${{ steps.versions.outputs.node }}
1230+
1231+ - name : Build E2E app
1232+ working-directory : dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}
1233+ timeout-minutes : 5
1234+ run : yarn ${{ matrix.build-command || 'test:build' }}
1235+
1236+ - name : Run E2E test
1237+ working-directory : dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}
1238+ timeout-minutes : 5
1239+ run : yarn test:assert
1240+
11791241 job_required_jobs_passed :
11801242 name : All required jobs passed or were skipped
11811243 needs :
@@ -1195,6 +1257,7 @@ jobs:
11951257 job_browser_loader_tests,
11961258 job_remix_integration_tests,
11971259 job_e2e_tests,
1260+ job_profiling_e2e_tests,
11981261 job_artifacts,
11991262 job_lint,
12001263 job_check_format,
0 commit comments