File tree Expand file tree Collapse file tree 1 file changed +29
-2
lines changed
Expand file tree Collapse file tree 1 file changed +29
-2
lines changed Original file line number Diff line number Diff line change @@ -106,10 +106,37 @@ jobs:
106106 vscode-extension/out/
107107 retention-days : 7
108108
109- mutation-testing :
109+ check-code-changes :
110110 runs-on : ubuntu-latest
111- needs : build
112111 if : github.event_name == 'pull_request'
112+ outputs :
113+ vscode_src_changed : ${{ steps.detect.outputs.changed }}
114+ steps :
115+ - name : Harden the runner (Audit all outbound calls)
116+ uses : step-security/harden-runner@f808768d1510423e83855289c910610ca9b43176 # v2.17.0
117+ with :
118+ egress-policy : audit
119+
120+ - name : Checkout code
121+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
122+ with :
123+ fetch-depth : 0
124+
125+ - name : Detect vscode-extension source changes
126+ id : detect
127+ run : |
128+ changed=$(git diff --name-only origin/${{ github.base_ref }}...HEAD \
129+ | grep -cE '^vscode-extension/src/.*\.ts$|^vscode-extension/test/.*\.ts$|^vscode-extension/stryker\.config\.mjs$' || true)
130+ if [ "$changed" -gt 0 ]; then
131+ echo "changed=true" >> "$GITHUB_OUTPUT"
132+ else
133+ echo "changed=false" >> "$GITHUB_OUTPUT"
134+ fi
135+
136+ mutation-testing :
137+ runs-on : ubuntu-latest
138+ needs : [build, check-code-changes]
139+ if : github.event_name == 'pull_request' && needs.check-code-changes.outputs.vscode_src_changed == 'true'
113140 # Informational — does not block the PR. A failing mutation score
114141 # is visible in the artifact but does not block merging during rollout.
115142 continue-on-error : true
You can’t perform that action at this time.
0 commit comments