@@ -87,10 +87,12 @@ jobs:
87
87
id : changed
88
88
with :
89
89
filters : |
90
+ workflow: &workflow
91
+ - '.github/**'
90
92
shared: &shared
93
+ - *workflow
91
94
- '*.{js,ts,json,yml,lock}'
92
95
- 'CHANGELOG.md'
93
- - '.github/**'
94
96
- 'jest/**'
95
97
- 'scripts/**'
96
98
- 'packages/core/**'
@@ -115,6 +117,11 @@ jobs:
115
117
- *shared
116
118
- *browser
117
119
- 'packages/ember/**'
120
+ node:
121
+ - *shared
122
+ - 'packages/node/**'
123
+ - 'packages/node-experimental/**'
124
+ - 'dev-packages/node-integration-tests/**'
118
125
nextjs:
119
126
- *shared
120
127
- *browser
@@ -127,18 +134,16 @@ jobs:
127
134
- 'packages/remix/**'
128
135
- 'packages/node/**'
129
136
- 'packages/react/**'
130
- node:
131
- - *shared
132
- - 'packages/node/**'
133
- - 'packages/node-experimental/**'
134
- - 'packages/profiling-node/**'
135
- - 'dev-packages/node-integration-tests/**'
136
137
profiling_node:
137
138
- *shared
138
139
- 'packages/node/**'
140
+ - 'packages/node-experimental/**'
139
141
- 'packages/profiling-node/**'
142
+ - 'dev-packages/e2e-tests/test-applications/node-profiling/**'
140
143
profiling_node_bindings:
141
- - 'packages/profiling-node/bindings/**'
144
+ - *workflow
145
+ - 'packages/profiling-node/**'
146
+ - 'dev-packages/e2e-tests/test-applications/node-profiling/**'
142
147
deno:
143
148
- *shared
144
149
- *browser
@@ -554,7 +559,7 @@ jobs:
554
559
job_profiling_node_unit_tests :
555
560
name : Node Profiling Unit Tests
556
561
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'
558
563
runs-on : ubuntu-latest
559
564
timeout-minutes : 10
560
565
steps :
@@ -1064,7 +1069,6 @@ jobs:
1064
1069
' node-experimental-fastify-app' ,
1065
1070
' node-hapi-app' ,
1066
1071
' node-exports-test-app' ,
1067
- ' node-profiling' ,
1068
1072
' vue-3'
1069
1073
]
1070
1074
build-command :
@@ -1086,7 +1090,6 @@ jobs:
1086
1090
- test-application : ' nextjs-app-dir'
1087
1091
build-command : ' test:build-13'
1088
1092
label : ' nextjs-app-dir (next@13)'
1089
-
1090
1093
steps :
1091
1094
- name : Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
1092
1095
uses : actions/checkout@v4
@@ -1107,34 +1110,6 @@ jobs:
1107
1110
env :
1108
1111
DEPENDENCY_CACHE_KEY : ${{ needs.job_build.outputs.dependency_cache_key }}
1109
1112
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
-
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