Support base64-encoded image in inference cache #1242
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Required Checks | |
on: | |
pull_request: | |
branches: | |
- mainline | |
- releases/* | |
push: | |
branches: | |
- mainline | |
- releases/* | |
permissions: | |
contents: read | |
id-token: write | |
jobs: | |
Determine-changes: | |
name: Determine Scope of Changes | |
runs-on: ubuntu-latest | |
outputs: | |
non_documentation_changes_found: ${{ steps.check_changes.outputs.non_documentation_changes_found }} | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
path: marqo | |
- name: Check for Non-Markdown Changes | |
id: check_changes | |
run: | | |
cd marqo | |
set -x | |
# Determine BASE_COMMIT and HEAD_COMMIT based on the event type | |
if [[ "${GITHUB_EVENT_NAME}" == "pull_request" ]]; then | |
BASE_COMMIT=${{ github.event.pull_request.base.sha }} | |
HEAD_COMMIT=${{ github.event.pull_request.head.sha }} | |
elif [[ "${GITHUB_EVENT_NAME}" == "push" ]]; then | |
BASE_COMMIT=${{ github.event.before }} | |
HEAD_COMMIT=${{ github.sha }} | |
elif [[ "${GITHUB_EVENT_NAME}" == "workflow_dispatch" ]]; then | |
# For manual dispatch, we always run the tests | |
echo "non_documentation_changes_found=true" >> "$GITHUB_OUTPUT" | |
exit 0 | |
else | |
echo "Unsupported event: ${GITHUB_EVENT_NAME}" | |
exit 1 | |
fi | |
# Debug: Print base and head commits | |
echo "Base commit: $BASE_COMMIT" | |
echo "Head commit: $HEAD_COMMIT" | |
# Perform the diff to check for non-documentation changes | |
if git diff --name-only $BASE_COMMIT $HEAD_COMMIT -- | grep -vE '\.(md)$'; then | |
echo "non_documentation_changes_found=true" >> "$GITHUB_OUTPUT" | |
else | |
echo "non_documentation_changes_found=false" >> "$GITHUB_OUTPUT" | |
fi | |
Run-integration-tests: | |
needs: Determine-changes | |
if: needs.Determine-changes.outputs.non_documentation_changes_found == 'true' | |
uses: ./.github/workflows/integration_tests_CI.yml | |
with: | |
number_of_shards: 1 | |
number_of_replicas: 0 | |
secrets: inherit | |
Run-largemodel-integration-tests: | |
needs: Determine-changes | |
if: needs.Determine-changes.outputs.non_documentation_changes_found == 'true' | |
uses: ./.github/workflows/largemodel_integration_tests_CI.yml | |
secrets: inherit | |
Run-unit-tests: | |
needs: Determine-changes | |
if: needs.Determine-changes.outputs.non_documentation_changes_found == 'true' | |
uses: ./.github/workflows/unit_tests.yml | |
secrets: inherit | |
Run-coverage-checks: | |
needs: | |
- Determine-changes | |
- Run-integration-tests | |
- Run-largemodel-integration-tests | |
- Run-unit-tests | |
if: needs.Determine-changes.outputs.non_documentation_changes_found == 'true' | |
uses: ./.github/workflows/run_required_checks_coverage.yml | |
# GitHub status will rely on the result of this step to determine if the PR is ready for merge | |
Report-required-test-status: | |
needs: [Determine-changes, Run-coverage-checks] | |
runs-on: ubuntu-latest | |
if: always() | |
steps: | |
- name: Set integration test status | |
run: | | |
if [[ "${{ needs.Determine-changes.outputs.non_documentation_changes_found }}" == "false" ]]; then | |
echo "Tests skipped due to markdown-only changes" | |
elif [[ "${{ needs.Run-coverage-checks.result }}" == "success" ]]; then | |
echo "Tests completed successfully" | |
else | |
echo "Tests failed or did not run" | |
exit 1 | |
fi |