Skip to content

AOAI eval fixesOnline Evaluation Schedule AOAI Evaluators Support #4560

AOAI eval fixesOnline Evaluation Schedule AOAI Evaluators Support

AOAI eval fixesOnline Evaluation Schedule AOAI Evaluators Support #4560

Workflow file for this run

name: scripts-test
on:
pull_request:
branches:
- main
pull_request_target:
branches:
- main
types:
- opened
- labeled
- synchronize
- reopened
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
check-execution-context:
uses: Azure/azureml-assets/.github/workflows/check-execution-context.yaml@main
check-directory-file-changes:
needs: check-execution-context
if: fromJSON(needs.check-execution-context.outputs.continue)
uses: Azure/azureml-assets/.github/workflows/check-changed-files.yaml@main
with:
folder_path: "scripts/azureml-assets/**"
forked_pr_input: ${{ needs.check-execution-context.outputs.forked_pr }}
test:
name: Test scripts
if: needs.check-directory-file-changes.outputs.files-changed != ''
runs-on: ubuntu-latest
needs: [check-execution-context, check-directory-file-changes]
environment: Testing
permissions:
# Required to clone repo
contents: read
# Required for OIDC login to Azure
id-token: write
# Required for EnricoMi/publish-unit-test-result-action
checks: write
issues: read
pull-requests: write
env:
scripts_azureml_assets_dir: scripts/azureml-assets
scripts_setup_dir: scripts/setup
scripts_test_dir: scripts/test
test_dir: test
resources_dir: test/resources
pytest_reports: pytest-reports
steps:
- name: Clone branch
uses: Azure/azureml-assets/.github/actions/clone-repo@main
with:
forked-pr: ${{ needs.check-execution-context.outputs.forked_pr }}
- name: Use Python 3.10 or newer
uses: actions/setup-python@v4
with:
python-version: '>=3.10'
- name: Install dependencies
run: pip install -e $scripts_azureml_assets_dir -r $scripts_test_dir/requirements.txt
- name: Log in to Azure and create resources
uses: ./.github/actions/create-azure-resources
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
scripts-setup-dir: ${{ env.scripts_setup_dir }}
- name: Test scripts
run: pytest --junitxml=$pytest_reports/test-result.xml --ignore=$resources_dir --resource-group $resource_group --registry $container_registry $test_dir
- name: Publish test results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
check_name: Test Results for ${{ github.workflow }}
junit_files: ${{ env.pytest_reports }}/**/*.xml