mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-15 06:00:48 +00:00
handle forks
# What does this PR do? ## Test Plan
This commit is contained in:
parent
204c2717ce
commit
d9e140057f
1 changed files with 26 additions and 5 deletions
31
.github/actions/run-and-record-tests/action.yml
vendored
31
.github/actions/run-and-record-tests/action.yml
vendored
|
@ -85,6 +85,7 @@ runs:
|
||||||
EXTRA_PARAMS=""
|
EXTRA_PARAMS=""
|
||||||
EXCLUDE_TESTS="${EXCLUDE_TESTS} or test_inference_store_tool_calls"
|
EXCLUDE_TESTS="${EXCLUDE_TESTS} or test_inference_store_tool_calls"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ "${{ inputs.run-vision-tests }}" == "true" ]; then
|
if [ "${{ inputs.run-vision-tests }}" == "true" ]; then
|
||||||
if uv run pytest -s -v tests/integration/inference/test_vision_inference.py --stack-config=${stack_config} \
|
if uv run pytest -s -v tests/integration/inference/test_vision_inference.py --stack-config=${stack_config} \
|
||||||
|
@ -173,11 +174,23 @@ runs:
|
||||||
git commit -m "Recordings update from CI"
|
git commit -m "Recordings update from CI"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
git fetch origin ${{ github.event.pull_request.head.ref }}
|
# Handle both fork PRs and regular PRs
|
||||||
git rebase origin/${{ github.event.pull_request.head.ref }}
|
if [ "${{ github.event.pull_request.head.repo.full_name }}" != "${{ github.repository }}" ]; then
|
||||||
echo "Rebased successfully"
|
echo "Fork PR detected from ${{ github.event.pull_request.head.repo.full_name }}"
|
||||||
git push origin HEAD:${{ github.event.pull_request.head.ref }}
|
echo "📦 Updated recordings are available as workflow artifacts"
|
||||||
echo "Pushed successfully"
|
echo ""
|
||||||
|
echo "To update your PR:"
|
||||||
|
echo "1. Download the 'updated-recordings' artifact from this workflow run"
|
||||||
|
echo "2. Extract the ZIP file"
|
||||||
|
echo "3. Replace tests/integration/recordings/ in your fork with the extracted files"
|
||||||
|
echo "4. Commit and push: git add tests/integration/recordings/ && git commit -m 'Update recordings' && git push"
|
||||||
|
else
|
||||||
|
git fetch origin ${{ github.event.pull_request.head.ref }}
|
||||||
|
git rebase origin/${{ github.event.pull_request.head.ref }}
|
||||||
|
echo "Rebased successfully"
|
||||||
|
git push origin HEAD:${{ github.event.pull_request.head.ref }}
|
||||||
|
echo "Pushed successfully"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "No recording changes"
|
echo "No recording changes"
|
||||||
fi
|
fi
|
||||||
|
@ -188,6 +201,14 @@ runs:
|
||||||
run: |
|
run: |
|
||||||
sudo docker logs ollama > ollama-${{ inputs.inference-mode }}.log || true
|
sudo docker logs ollama > ollama-${{ inputs.inference-mode }}.log || true
|
||||||
|
|
||||||
|
- name: Upload recordings (for fork PRs)
|
||||||
|
if: ${{ inputs.inference-mode == 'record' && github.event.pull_request.head.repo.full_name != github.repository }}
|
||||||
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||||
|
with:
|
||||||
|
name: updated-recordings-${{ github.run_id }}-${{ github.run_attempt || '' }}-${{ strategy.job-index }}
|
||||||
|
path: tests/integration/recordings/
|
||||||
|
retention-days: 7
|
||||||
|
|
||||||
- name: Upload logs
|
- name: Upload logs
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue