84
84
echo "COMMIT_SHA=$COMMIT_SHA" >> $GITHUB_ENV
85
85
echo "COMMIT_MESSAGE=$(git log -n 1 --pretty=format:%s $COMMIT_SHA)" >> $GITHUB_ENV
86
86
87
+ # Most changed packages are determined in job_build via Nx
88
+ # However, for profiling-node we only want to run certain things when in this specific package
89
+ # something changed, not in any of the dependencies (which include core, utils, ...)
90
+ - name : Determine changed packages
91
+
92
+ id : changed
93
+ with :
94
+ filters : |
95
+ profiling_node:
96
+ - 'packages/profiling-node/**'
97
+ - 'dev-packages/e2e-tests/test-applications/node-profiling/**'
98
+
87
99
- name : Get PR labels
88
100
id : pr-labels
89
101
uses : mydea/pr-labels-action@fn/bump-node20
93
105
# Note: These next three have to be checked as strings ('true'/'false')!
94
106
is_develop : ${{ github.ref == 'refs/heads/develop' }}
95
107
is_release : ${{ startsWith(github.ref, 'refs/heads/release/') }}
108
+ changed_profiling_node : ${{ steps.changed.outputs.profiling_node == 'true' }}
96
109
# When merging into master, or from master
97
110
is_gitflow_sync : ${{ github.head_ref == 'master' || github.ref == 'refs/heads/master' }}
98
111
has_gitflow_label :
@@ -184,10 +197,10 @@ jobs:
184
197
changed_node_integration : ${{ contains(steps.checkForAffected.outputs.affected, '@sentry-internal/node-integration-tests') }}
185
198
changed_remix : ${{ contains(steps.checkForAffected.outputs.affected, '@sentry/remix') }}
186
199
changed_node : ${{ contains(steps.checkForAffected.outputs.affected, '@sentry/node') }}
187
- changed_profiling_node : ${{ contains(steps.checkForAffected.outputs.affected, '@sentry/profiling-node') }}
188
200
changed_deno : ${{ contains(steps.checkForAffected.outputs.affected, '@sentry/deno') }}
189
201
changed_bun : ${{ contains(steps.checkForAffected.outputs.affected, '@sentry/bun') }}
190
202
changed_browser_integration : ${{ contains(steps.checkForAffected.outputs.affected, '@sentry-internal/browser-integration-tests') }}
203
+ # If you are looking for changed_profiling_node, this is defined in job_get_metadata
191
204
192
205
job_check_branches :
193
206
name : Check PR branches
@@ -486,7 +499,7 @@ jobs:
486
499
job_profiling_node_unit_tests :
487
500
name : Node Profiling Unit Tests
488
501
needs : [job_get_metadata, job_build]
489
- if : needs.job_build.outputs.changed_node == 'true' || needs.job_build .outputs.changed_profiling_node == 'true' || github.event_name != 'pull_request'
502
+ if : needs.job_build.outputs.changed_node == 'true' || needs.job_get_metadata .outputs.changed_profiling_node == 'true' || github.event_name != 'pull_request'
490
503
runs-on : ubuntu-latest
491
504
timeout-minutes : 10
492
505
steps :
@@ -809,7 +822,7 @@ jobs:
809
822
# Rebuild profiling by compiling TS and pull the precompiled binary artifacts
810
823
- name : Build Profiling Node
811
824
if : |
812
- (needs.job_build .outputs.changed_profiling_node == 'true') ||
825
+ (needs.job_get_metadata .outputs.changed_profiling_node == 'true') ||
813
826
(needs.job_get_metadata.outputs.is_release == 'true') ||
814
827
(github.event_name != 'pull_request')
815
828
run : yarn lerna run build:lib --scope @sentry/profiling-node
@@ -818,7 +831,7 @@ jobs:
818
831
# @TODO: v4 breaks convenient merging of same name artifacts
819
832
# https://github.com/actions/upload-artifact/issues/478
820
833
if : |
821
- (needs.job_build .outputs.changed_profiling_node == 'true') ||
834
+ (needs.job_get_metadata .outputs.changed_profiling_node == 'true') ||
822
835
(needs.job_get_metadata.outputs.is_release == 'true') ||
823
836
(github.event_name != 'pull_request')
824
837
uses : actions/download-artifact@v3
@@ -1105,7 +1118,7 @@ jobs:
1105
1118
always() && needs.job_e2e_prepare.result == 'success' &&
1106
1119
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) &&
1107
1120
(
1108
- (needs.job_build .outputs.changed_profiling_node == 'true') ||
1121
+ (needs.job_get_metadata .outputs.changed_profiling_node == 'true') ||
1109
1122
(needs.job_get_metadata.outputs.is_release == 'true') ||
1110
1123
(github.event_name != 'pull_request')
1111
1124
)
@@ -1259,7 +1272,7 @@ jobs:
1259
1272
# Compiling bindings can be very slow (especially on windows), so only run precompile
1260
1273
# Skip precompile unless we are on a release branch as precompile slows down CI times.
1261
1274
if : |
1262
- (needs.job_build .outputs.changed_profiling_node == 'true') ||
1275
+ (needs.job_get_metadata .outputs.changed_profiling_node == 'true') ||
1263
1276
(needs.job_get_metadata.outputs.is_release == 'true') ||
1264
1277
(github.event_name != 'pull_request')
1265
1278
runs-on : ${{ matrix.os }}
0 commit comments