@@ -117,6 +117,11 @@ jobs:
117
117
- *shared
118
118
- *browser
119
119
- 'packages/ember/**'
120
+ node:
121
+ - *shared
122
+ - 'packages/node/**'
123
+ - 'packages/node-experimental/**'
124
+ - 'dev-packages/node-integration-tests/**'
120
125
nextjs:
121
126
- *shared
122
127
- *browser
@@ -129,20 +134,15 @@ jobs:
129
134
- 'packages/remix/**'
130
135
- 'packages/node/**'
131
136
- 'packages/react/**'
132
- node:
133
- - *shared
134
- - 'packages/node/**'
135
- - 'packages/node-experimental/**'
136
- - 'packages/profiling-node/**'
137
- - 'dev-packages/node-integration-tests/**'
138
137
profiling_node:
139
138
- *shared
140
139
- 'packages/node/**'
140
+ - 'packages/node-experimental/**'
141
141
- 'packages/profiling-node/**'
142
142
- 'dev-packages/e2e-tests/test-applications/node-profiling/**'
143
143
profiling_node_bindings:
144
144
- *workflow
145
- - 'packages/profiling-node/bindings/ **'
145
+ - 'packages/profiling-node/**'
146
146
- 'dev-packages/e2e-tests/test-applications/node-profiling/**'
147
147
deno:
148
148
- *shared
@@ -559,7 +559,7 @@ jobs:
559
559
job_profiling_node_unit_tests :
560
560
name : Node Profiling Unit Tests
561
561
needs : [job_get_metadata, job_build]
562
- 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'
563
563
runs-on : ubuntu-latest
564
564
timeout-minutes : 10
565
565
steps :
@@ -1069,7 +1069,6 @@ jobs:
1069
1069
' node-experimental-fastify-app' ,
1070
1070
' node-hapi-app' ,
1071
1071
' node-exports-test-app' ,
1072
- ' node-profiling' ,
1073
1072
' vue-3'
1074
1073
]
1075
1074
build-command :
@@ -1091,7 +1090,6 @@ jobs:
1091
1090
- test-application : ' nextjs-app-dir'
1092
1091
build-command : ' test:build-13'
1093
1092
label : ' nextjs-app-dir (next@13)'
1094
-
1095
1093
steps :
1096
1094
- name : Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
1097
1095
uses : actions/checkout@v4
@@ -1112,29 +1110,6 @@ jobs:
1112
1110
env :
1113
1111
DEPENDENCY_CACHE_KEY : ${{ needs.job_build.outputs.dependency_cache_key }}
1114
1112
1115
- # Rebuild profiling by compiling TS and pull the precompiled binary artifacts
1116
- - name : Build Profiling Node
1117
- if : |
1118
- (needs.job_get_metadata.outputs.changed_profiling_node_bindings == 'true') ||
1119
- (needs.job_get_metadata.outputs.is_release == 'true') ||
1120
- (github.event_name != 'pull_request')
1121
- run : yarn lerna run build:lib --scope @sentry/profiling-node
1122
-
1123
- - name : Extract Profiling Node Prebuilt Binaries
1124
- # @TODO: v4 breaks convenient merging of same name artifacts
1125
- # https://github.com/actions/upload-artifact/issues/478
1126
- if : |
1127
- (needs.job_get_metadata.outputs.changed_profiling_node_bindings == 'true') ||
1128
- (github.event_name != 'pull_request')
1129
- uses : actions/download-artifact@v3
1130
- with :
1131
- name : profiling-node-binaries-${{ github.sha }}
1132
- path : ${{ github.workspace }}/packages/profiling-node/lib/
1133
-
1134
- - name : Build Profiling tarball
1135
- run : yarn build:tarball --scope @sentry/profiling-node
1136
- # End rebuild profiling
1137
-
1138
1113
- name : Restore tarball cache
1139
1114
uses : actions/cache/restore@v4
1140
1115
with :
@@ -1176,6 +1151,93 @@ jobs:
1176
1151
directory : dist
1177
1152
workingDirectory : dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}
1178
1153
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
+
1179
1241
job_required_jobs_passed :
1180
1242
name : All required jobs passed or were skipped
1181
1243
needs :
@@ -1195,6 +1257,7 @@ jobs:
1195
1257
job_browser_loader_tests,
1196
1258
job_remix_integration_tests,
1197
1259
job_e2e_tests,
1260
+ job_profiling_e2e_tests,
1198
1261
job_artifacts,
1199
1262
job_lint,
1200
1263
job_check_format,
0 commit comments