@@ -261,97 +261,13 @@ jobs:
261261 }
262262 }
263263
264- # Check if PR contains code changes (not just docs/metadata)
265- # Skip e2e tests if only docs/metadata files are changed
266- check-code-changes :
267- runs-on : ubuntu-latest
268- needs : gate
269- # Only run this check if gate allows the workflow to proceed
270- if : needs.gate.outputs.should_run == 'true'
271- permissions :
272- contents : read
273- pull-requests : read
274- outputs :
275- has_code_changes : ${{ steps.filter.outputs.code }}
276- steps :
277- - name : Checkout source
278- uses : actions/checkout@v4
279- with :
280- # Use PR head SHA from gate (works for both pull_request and issue_comment)
281- ref : ${{ needs.gate.outputs.pr_head_sha }}
282- # Fetch enough history to get the base branch
283- fetch-depth : 0
284-
285- - name : Get base ref
286- id : get-base
287- run : |
288- # For pull_request event, get base ref from event
289- if [ "${{ github.event_name }}" = "pull_request" ]; then
290- echo "base=${{ github.event.pull_request.base.sha }}" >> $GITHUB_OUTPUT
291- else
292- # For issue_comment event (e.g., /ok-to-test), fetch PR details to get base branch
293- # PR number comes from gate job output
294- PR_NUM="${{ needs.gate.outputs.pr_number }}"
295- if [ -n "$PR_NUM" ] && [ "$PR_NUM" != "" ]; then
296- # Fetch PR details to get the base branch
297- if BASE_REF=$(gh pr view "$PR_NUM" --json baseRefName --jq '.baseRefName'); then
298- echo "Detected base branch: $BASE_REF"
299- if git fetch origin "$BASE_REF:$BASE_REF" 2>&1; then
300- echo "Successfully fetched branch $BASE_REF"
301- else
302- echo "Warning: Failed to fetch branch $BASE_REF, will use origin/$BASE_REF reference"
303- fi
304- echo "base=origin/$BASE_REF" >> $GITHUB_OUTPUT
305- else
306- echo "Warning: Failed to fetch PR details for PR #$PR_NUM"
307- # Fallback to default branch
308- DEFAULT_BRANCH=$(gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name')
309- echo "Using default branch: $DEFAULT_BRANCH"
310- if git fetch origin "$DEFAULT_BRANCH:$DEFAULT_BRANCH" 2>&1; then
311- echo "Successfully fetched default branch $DEFAULT_BRANCH"
312- else
313- echo "Warning: Failed to fetch default branch $DEFAULT_BRANCH, will use origin/$DEFAULT_BRANCH reference"
314- fi
315- echo "base=origin/$DEFAULT_BRANCH" >> $GITHUB_OUTPUT
316- fi
317- else
318- echo "Warning: PR number is empty or not available"
319- # Fallback: use repository default branch
320- DEFAULT_BRANCH=$(gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name')
321- echo "Using default branch: $DEFAULT_BRANCH"
322- if git fetch origin "$DEFAULT_BRANCH:$DEFAULT_BRANCH" 2>&1; then
323- echo "Successfully fetched default branch $DEFAULT_BRANCH"
324- else
325- echo "Warning: Failed to fetch default branch $DEFAULT_BRANCH, will use origin/$DEFAULT_BRANCH reference"
326- fi
327- echo "base=origin/$DEFAULT_BRANCH" >> $GITHUB_OUTPUT
328- fi
329- fi
330- env :
331- GH_TOKEN : ${{ github.token }}
332-
333- - name : Check for code changes
334- uses : dorny/paths-filter@v3
335- id : filter
336- with :
337- base : ${{ steps.get-base.outputs.base }}
338- filters : |
339- code:
340- - '!docs/**'
341- - '!README.md'
342- - '!CONTRIBUTING.md'
343- - '!LICENSE'
344- - '!OWNERS'
345- - '!PROJECT'
346-
347264 # Build the WVA controller image on GitHub-hosted runner (has proper Docker setup)
348265 # Note: Skip for fork PRs on pull_request event (no secrets access).
349266 # For fork PRs, build-image runs via issue_comment trigger (/ok-to-test).
350267 build-image :
351- needs : [ gate, check-code-changes]
268+ needs : gate
352269 if : |
353270 needs.gate.outputs.should_run == 'true' &&
354- needs.check-code-changes.outputs.has_code_changes == 'true' &&
355271 (needs.gate.outputs.is_fork_pr != 'true' || github.event_name != 'pull_request')
356272 runs-on : ubuntu-latest
357273 outputs :
@@ -395,10 +311,8 @@ jobs:
395311 # Run e2e tests on OpenShift self-hosted runner
396312 e2e-openshift :
397313 runs-on : [self-hosted, openshift]
398- needs : [gate, build-image, check-code-changes]
399- if : |
400- needs.gate.outputs.should_run == 'true' &&
401- needs.check-code-changes.outputs.has_code_changes == 'true'
314+ needs : [gate, build-image]
315+ if : needs.gate.outputs.should_run == 'true'
402316 env :
403317 MODEL_ID : ${{ github.event.inputs.model_id || 'unsloth/Meta-Llama-3.1-8B' }}
404318 ACCELERATOR_TYPE : ${{ github.event.inputs.accelerator_type || 'A100' }}
0 commit comments