feat: honor explicit disabled tool configuration through Runtime #36
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: agents-api | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'services/agents-api/**' | |
| - 'contracts/agents-api/**' | |
| - 'packages/agents-client/**' | |
| - 'internal/**' | |
| - 'go.mod' | |
| - 'go.sum' | |
| - 'Makefile' | |
| - 'scripts/build-agents-api.sh' | |
| - 'scripts/build-agents-api-image.sh' | |
| - '.github/workflows/agents-api.yml' | |
| pull_request: | |
| paths: | |
| - 'services/agents-api/**' | |
| - 'contracts/agents-api/**' | |
| - 'packages/agents-client/**' | |
| - 'internal/**' | |
| - 'go.mod' | |
| - 'go.sum' | |
| - 'Makefile' | |
| - 'scripts/build-agents-api.sh' | |
| - 'scripts/build-agents-api-image.sh' | |
| - '.github/workflows/agents-api.yml' | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: agents-api-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| sessions: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| services: | |
| postgres: | |
| image: postgres:16-alpine | |
| env: | |
| POSTGRES_DB: parsar_agents_api_ci_tests | |
| POSTGRES_USER: agents_api | |
| POSTGRES_PASSWORD: agents_api_test_only | |
| ports: | |
| - 5432/tcp | |
| options: >- | |
| --health-cmd "pg_isready -U agents_api -d parsar_agents_api_ci_tests" | |
| --health-interval 5s | |
| --health-timeout 5s | |
| --health-retries 10 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-go@v7 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Verify dedicated execution persistence | |
| env: | |
| PARSAR_AGENTS_API_TEST_DATABASE_URL: postgres://agents_api:agents_api_test_only@127.0.0.1:${{ job.services.postgres.ports['5432'] }}/parsar_agents_api_ci_tests?sslmode=disable | |
| run: | | |
| AGENTS_API_BUILD_DIR="$RUNNER_TEMP/agents-api-build" make check-agents-api | |
| AGENTS_API_DATABASE_URL="$PARSAR_AGENTS_API_TEST_DATABASE_URL" "$RUNNER_TEMP/agents-api-build/agents-api-migrate" | |
| "$RUNNER_TEMP/agents-api-build/agents-api-device" --help | |
| "$RUNNER_TEMP/agents-api-build/agents-api-environment-key" --help | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.12' | |
| - name: Install pinned official client | |
| run: | | |
| python - <<'PY' | |
| import json, subprocess, sys | |
| pin = json.load(open('contracts/agents-api/upstream.json')) | |
| subprocess.run([sys.executable, '-m', 'pip', 'install', '-r', 'services/agents-api/tests/requirements.txt', | |
| 'openai @ git+https://github.com/openai/openai-python@' + pin['commit']], check=True) | |
| PY | |
| - name: Verify official-client HTTP compatibility | |
| env: | |
| PARSAR_AGENTS_API_TEST_DATABASE_URL: postgres://agents_api:agents_api_test_only@127.0.0.1:${{ job.services.postgres.ports['5432'] }}/parsar_agents_api_ci_tests?sslmode=disable | |
| AGENTS_API_SERVER_BIN: ${{ runner.temp }}/agents-api-build/agents-api | |
| PARSAR_OFFICIAL_SDK_PYTHON: python | |
| run: | | |
| python services/agents-api/tests/official_client.py | |
| go test ./services/agents-api/internal/store -run '^(TestFunctionStateOfficialClientReadsAndLiveEvents|TestSavedReferenceRetryOfficialClient|TestAgentUpdateOfficialClient|TestAgentDeletionOfficialClient|TestSessionAgentFilterOfficialClient|TestSessionDeletionOfficialClient|TestEnvironmentInitialFailureOfficialClient|TestSelfHostedInitialCreationOfficialClient|TestSelfHostedCancellationOfficialClient|TestSelfHostedFunctionsOfficialClient|TestSelfHostedSteeringOfficialClient)$' -count=1 | |
| - name: Verify standalone container distribution | |
| env: | |
| PARSAR_AGENTS_API_TEST_DATABASE_URL: postgres://agents_api:agents_api_test_only@127.0.0.1:${{ job.services.postgres.ports['5432'] }}/parsar_agents_api_ci_tests?sslmode=disable | |
| AGENTS_API_IMAGE: agents-api:ci | |
| PARSAR_OFFICIAL_SDK_PYTHON: python | |
| run: make check-agents-api-container |