Skip to content

Add azd ai eval extension for Foundry evaluations #275

Add azd ai eval extension for Foundry evaluations

Add azd ai eval extension for Foundry evaluations #275

name: verify-ext-providers
on:
pull_request:
paths:
- "cli/azd/extensions/*/extension.yaml"
- "cli/azd/extensions/*/internal/cmd/providers_manifest_test.go"
- "cli/azd/extensions/extension.schema.json"
- "cli/azd/extensions/registry.schema.json"
- "cli/azd/pkg/extensions/registry.go"
- "cli/azd/pkg/extensions/validate_registry.go"
- "cli/azd/pkg/extensions/capability_schema_test.go"
- "cli/azd/pkg/extensions/extension_manifest_files_test.go"
- ".github/workflows/verify-ext-providers.yml"
branches: [main]
workflow_call:
inputs:
working-directory:
description: "Path to the extension module directory"
required: true
type: string
go-version-file:
description: "Path to go.mod to read Go version from"
required: false
type: string
default: "cli/azd/go.mod"
permissions:
contents: read
jobs:
verify-coverage:
if: inputs.working-directory == ''
runs-on: ubuntu-latest
defaults:
run:
working-directory: cli/azd
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: cli/azd/go.mod
- name: Verify provider contract coverage
run: |
go test ./pkg/extensions \
-run '^(TestExtensionManifestsHaveProviderVerificationTests|TestCapabilitySchemaTypesInSyncWithGo|TestHasCanonicalProviderVerificationTestRequiresAssertedError)$' -v
verify-providers:
if: inputs.working-directory != ''
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: ${{ inputs.go-version-file }}
# go test -run exits 0 when nothing matches, so first require the
# canonical test file and exact test name.
- name: Verify providers match manifest
working-directory: ${{ inputs.working-directory }}
run: |
if [ ! -f internal/cmd/providers_manifest_test.go ]; then
echo "::error::internal/cmd/providers_manifest_test.go not found."
exit 1
fi
if ! go test ./internal/cmd/ -list '^TestConfigureExtensionHostMatchesManifest$' \
| grep -qx 'TestConfigureExtensionHostMatchesManifest'; then
echo "::error::TestConfigureExtensionHostMatchesManifest not found in ./internal/cmd/."
exit 1
fi
go test ./internal/cmd/ -run '^TestConfigureExtensionHostMatchesManifest$' -v