From dd49bb718948b533d93250c12c5f794af8a9bb33 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Thu, 23 Jan 2025 15:05:07 +0200 Subject: [PATCH 1/2] Enable the integration tests for Anthropic Signed-off-by: Radoslav Dimitrov --- tests/integration/testcases.yaml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/tests/integration/testcases.yaml b/tests/integration/testcases.yaml index 4273a120..3aeee45a 100644 --- a/tests/integration/testcases.yaml +++ b/tests/integration/testcases.yaml @@ -217,15 +217,7 @@ testcases: "temperature":0 } likes: | - Hello! I'm CodeGate, your security-focused AI assistant. I can help you with: - - - Software security analysis and reviews - - Package security assessments - - Secure coding practices and guidance - - Security vulnerability analysis - - Best practices for secure implementations - - How can I assist you with your security needs today? + Hello! How can I assist you today? anthropic_fim: name: Anthropic FIM From f9f8d8399dac051811be6bf08ecb476ad050ba78 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Thu, 23 Jan 2025 15:09:01 +0200 Subject: [PATCH 2/2] Add the secret for the anthropic key Signed-off-by: Radoslav Dimitrov --- .github/workflows/integration-tests.yml | 10 ++++++++++ .github/workflows/run-on-pr.yml | 1 + .github/workflows/run-on-push.yml | 1 + 3 files changed, 12 insertions(+) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index b39a21fd..b721ee4e 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -12,6 +12,9 @@ on: copilot-key: description: 'The Copilot key to use for integration tests' required: true + anthropic-key: + description: 'The Anthropic key to use for integration tests' + required: true jobs: integration-tests: @@ -136,6 +139,13 @@ jobs: run: | poetry run python tests/integration/integration_tests.py + - name: Run integration tests - Anthropic + env: + CODEGATE_PROVIDERS: "anthropic" + ENV_ANTHROPIC_KEY: ${{ secrets.anthropic-key }} + run: | + poetry run python tests/integration/integration_tests.py + - name: Print the container logs (useful for debugging) if: always() run: | diff --git a/.github/workflows/run-on-pr.yml b/.github/workflows/run-on-pr.yml index 7f82424d..03565b1f 100644 --- a/.github/workflows/run-on-pr.yml +++ b/.github/workflows/run-on-pr.yml @@ -28,3 +28,4 @@ jobs: artifact-name: "codegate-image" secrets: copilot-key: ${{ secrets.INTEGRATION_TESTS_COPILOT_KEY }} + anthropic-key: ${{ secrets.INTEGRATION_TESTS_ANTHROPIC_KEY }} diff --git a/.github/workflows/run-on-push.yml b/.github/workflows/run-on-push.yml index 9525ef2c..94f057f8 100644 --- a/.github/workflows/run-on-push.yml +++ b/.github/workflows/run-on-push.yml @@ -27,6 +27,7 @@ jobs: artifact-name: "codegate-image" secrets: copilot-key: ${{ secrets.INTEGRATION_TESTS_COPILOT_KEY }} + anthropic-key: ${{ secrets.INTEGRATION_TESTS_ANTHROPIC_KEY }} openapi: name: Generate the OpenAPI docs needs: [ci]