Skip to content

Create tools reference doc for the Smart Vector Index DB tool #1642

Create tools reference doc for the Smart Vector Index DB tool

Create tools reference doc for the Smart Vector Index DB tool #1642

Workflow file for this run

name: tools_tests
on:
# Triggers the workflow pull request events but only for the main branch
pull_request:
branches: [ main ]
jobs:
run_tool_ci_job:
# The type of runner that the job will run on
runs-on: ubuntu-latest
name: Tool Test
timeout-minutes: 30
steps:
- name: Check for dockerenv file
run: (ls /.dockerenv && echo Found dockerenv) || (echo No dockerenv)
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout repository
uses: actions/checkout@v3
- name: Check for changes
id: check_changes
run: |
git fetch origin ${{ github.base_ref }} # Fetch the base branch
CHANGED=$(git diff --name-only FETCH_HEAD..HEAD -- 'src/promptflow-tools/')
if [ -n "$CHANGED" ]; then
echo "Changes detected in src/promptflow-tools/"
echo "run_tests=true" >> $GITHUB_OUTPUT
else
echo "No changes detected in src/promptflow-tools/"
echo "run_tests=false" >> $GITHUB_OUTPUT
fi
- name: Setup
if: steps.check_changes.outputs.run_tests == 'true'
run: |
python -m pip install --upgrade pip
pip install promptflow
pip install pytest pytest_mock
pip install azure-identity azure-keyvault-secrets
- name: Generate configs
if: steps.check_changes.outputs.run_tests == 'true'
run: |
python ./scripts/tool/generate_connection_config.py --tenant_id ${{ secrets.TENANT_ID }} --client_id ${{ secrets.CLIENT_ID }} --client_secret ${{ secrets.CLIENT_SECRET }}
- name: Run tests
if: steps.check_changes.outputs.run_tests == 'true'
run: |
pytest ./src/promptflow-tools/tests