@@ -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
@@ -551,7 +551,7 @@ jobs:
551
551
job_profiling_node_unit_tests :
552
552
name : Node Profiling Unit Tests
553
553
needs : [job_get_metadata, job_build]
554
- if : needs.job_get_metadata.outputs.changed_node =='true' || needs.job_get_metadata.outputs.changed_profiling_node == 'true' || github.event_name != 'pull_request'
554
+ if : needs.job_get_metadata.outputs.changed_node == 'true' || needs.job_get_metadata.outputs.changed_profiling_node == 'true' || github.event_name != 'pull_request'
555
555
runs-on : ubuntu-latest
556
556
timeout-minutes : 10
557
557
steps :
@@ -1061,7 +1061,6 @@ jobs:
1061
1061
' node-experimental-fastify-app' ,
1062
1062
' node-hapi-app' ,
1063
1063
' node-exports-test-app' ,
1064
- ' node-profiling' ,
1065
1064
' vue-3'
1066
1065
]
1067
1066
build-command :
@@ -1083,7 +1082,6 @@ jobs:
1083
1082
- test-application : ' nextjs-app-dir'
1084
1083
build-command : ' test:build-13'
1085
1084
label : ' nextjs-app-dir (next@13)'
1086
-
1087
1085
steps :
1088
1086
- name : Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
1089
1087
uses : actions/checkout@v4
@@ -1104,29 +1102,6 @@ jobs:
1104
1102
env :
1105
1103
DEPENDENCY_CACHE_KEY : ${{ needs.job_build.outputs.dependency_cache_key }}
1106
1104
1107
- # Rebuild profiling by compiling TS and pull the precompiled binary artifacts
1108
- - name : Build Profiling Node
1109
- if : |
1110
- (needs.job_get_metadata.outputs.changed_profiling_node_bindings == 'true') ||
1111
- (needs.job_get_metadata.outputs.is_release == 'true') ||
1112
- (github.event_name != 'pull_request')
1113
- run : yarn lerna run build:lib --scope @sentry/profiling-node
1114
-
1115
- - name : Extract Profiling Node Prebuilt Binaries
1116
- # @TODO: v4 breaks convenient merging of same name artifacts
1117
- # https://github.com/actions/upload-artifact/issues/478
1118
- if : |
1119
- (needs.job_get_metadata.outputs.changed_profiling_node_bindings == 'true') ||
1120
- (github.event_name != 'pull_request')
1121
- uses : actions/download-artifact@v3
1122
- with :
1123
- name : profiling-node-binaries-${{ github.sha }}
1124
- path : ${{ github.workspace }}/packages/profiling-node/lib/
1125
-
1126
- - name : Build Profiling tarball
1127
- run : yarn build:tarball --scope @sentry/profiling-node
1128
- # End rebuild profiling
1129
-
1130
1105
- name : Restore tarball cache
1131
1106
uses : actions/cache/restore@v4
1132
1107
with :
@@ -1168,6 +1143,93 @@ jobs:
1168
1143
directory : dist
1169
1144
workingDirectory : dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}
1170
1145
1146
+ job_profiling_e2e_tests :
1147
+ name : E2E ${{ matrix.label || matrix.test-application }} Test
1148
+ # 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
1149
+ # Dependabot PRs sadly also don't have access to secrets, so we skip them as well
1150
+ # We need to add the `always()` check here because the previous step has this as well :(
1151
+ # See: https://github.com/actions/runner/issues/2205
1152
+ if :
1153
+ # Only run profiling e2e tests if profiling node bindings have changed
1154
+ always() && needs.job_e2e_prepare.result == 'success' &&
1155
+ (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) &&
1156
+ github.actor != 'dependabot[bot]' && (
1157
+ (needs.job_get_metadata.outputs.changed_profiling_node_bindings == 'true') ||
1158
+ (needs.job_get_metadata.outputs.is_release == 'true') ||
1159
+ (github.event_name != 'pull_request')
1160
+ )
1161
+ needs : [job_get_metadata, job_build, job_e2e_prepare]
1162
+ runs-on : ubuntu-20.04
1163
+ timeout-minutes : 10
1164
+ env :
1165
+ E2E_TEST_AUTH_TOKEN : ${{ secrets.E2E_TEST_AUTH_TOKEN }}
1166
+ E2E_TEST_DSN : ${{ secrets.E2E_TEST_DSN }}
1167
+ E2E_TEST_SENTRY_ORG_SLUG : ' sentry-javascript-sdks'
1168
+ E2E_TEST_SENTRY_TEST_PROJECT : ' sentry-javascript-e2e-tests'
1169
+ strategy :
1170
+ fail-fast : false
1171
+ matrix :
1172
+ test-application : ['node-profiling']
1173
+ build-command :
1174
+ - false
1175
+ label :
1176
+ - false
1177
+ steps :
1178
+ - name : Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
1179
+ uses : actions/checkout@v4
1180
+ with :
1181
+ ref : ${{ env.HEAD_COMMIT }}
1182
+ - uses : pnpm/action-setup@v2
1183
+ with :
1184
+ version : 8.3.1
1185
+ - name : Set up Node
1186
+ uses : actions/setup-node@v4
1187
+ with :
1188
+ node-version-file : ' dev-packages/e2e-tests/package.json'
1189
+ - name : Restore caches
1190
+ uses : ./.github/actions/restore-cache
1191
+ env :
1192
+ DEPENDENCY_CACHE_KEY : ${{ needs.job_build.outputs.dependency_cache_key }}
1193
+ - name : Build Profiling Node
1194
+ run : yarn lerna run build:lib --scope @sentry/profiling-node
1195
+ - name : Extract Profiling Node Prebuilt Binaries
1196
+ uses : actions/download-artifact@v3
1197
+ with :
1198
+ name : profiling-node-binaries-${{ github.sha }}
1199
+ path : ${{ github.workspace }}/packages/profiling-node/lib/
1200
+ - name : Build Profiling tarball
1201
+ run : yarn build:tarball --scope @sentry/profiling-node
1202
+ - name : Restore tarball cache
1203
+ uses : actions/cache/restore@v4
1204
+ with :
1205
+ path : ${{ github.workspace }}/packages/*/*.tgz
1206
+ key : ${{ env.BUILD_PROFILING_NODE_CACHE_TARBALL_KEY }}
1207
+
1208
+ - name : Get node version
1209
+ id : versions
1210
+ run : |
1211
+ echo "echo node=$(jq -r '.volta.node' dev-packages/e2e-tests/package.json)" >> $GITHUB_OUTPUT
1212
+
1213
+ - name : Validate Verdaccio
1214
+ run : yarn test:validate
1215
+ working-directory : dev-packages/e2e-tests
1216
+
1217
+ - name : Prepare Verdaccio
1218
+ run : yarn test:prepare
1219
+ working-directory : dev-packages/e2e-tests
1220
+ env :
1221
+ E2E_TEST_PUBLISH_SCRIPT_NODE_VERSION : ${{ steps.versions.outputs.node }}
1222
+
1223
+ - name : Build E2E app
1224
+ working-directory : dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}
1225
+ timeout-minutes : 5
1226
+ run : yarn ${{ matrix.build-command || 'test:build' }}
1227
+
1228
+ - name : Run E2E test
1229
+ working-directory : dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}
1230
+ timeout-minutes : 5
1231
+ run : yarn test:assert
1232
+
1171
1233
job_required_jobs_passed :
1172
1234
name : All required jobs passed or were skipped
1173
1235
needs :
@@ -1187,6 +1249,7 @@ jobs:
1187
1249
job_browser_loader_tests,
1188
1250
job_remix_integration_tests,
1189
1251
job_e2e_tests,
1252
+ job_profiling_e2e_tests,
1190
1253
job_artifacts,
1191
1254
job_lint,
1192
1255
job_check_format,
0 commit comments