Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: workflow to run E2E test on GitHub #161

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open

Conversation

tataranovich
Copy link
Contributor

@tataranovich tataranovich commented Jan 31, 2025

Example:

name: E2E test

on:
  workflow_dispatch:
    inputs:
      e2e-url:
        required: true
        description: "DIAL Chat URL"
        type: string
      e2e-overlay-url:
        required: true
        description: "DIAL Chat overlay URL"
        type: string
      test-repository:
        description: "E2E tests Git repository"
        type: string
        default: "epam/ai-dial-chat"
      test-branch:
        description: "E2E tests Git branch"
        type: string
        default: "development"

jobs:
  e2e-tests:
    uses: epam/ai-dial-ci/.github/workflows/gh-e2e-test.yml@gh-e2e-test
    with:
      e2e-host: ${{ github.event.inputs.e2e-url }}
      next-public-overlay-host: ${{ github.event.inputs.e2e-overlay-url }}
      e2e-workers: 6
      test-repository: ${{ github.event.inputs.test-repository }}
      test-branch: ${{ github.event.inputs.test-branch }}
      simple-request-model: 'gpt-35-turbo'
      issue-url: "https://github.com/epam/ai-dial-chat/issues"
      tms-url: "https://jira.epam.com/jira/browse"
      addons-list-for-tests: '[{"entityId":"addon-wolfram"}, {"entityId":"addon-xweather"}]'
      entity-arithmetic-request-for-api-tests: '[{ "entityId": "gpt-35-turbo", "isSysPromptAllowed": "true" },{ "entityId": "gpt-35-turbo-16k", "isSysPromptAllowed": "true" },{ "entityId": "gpt-35-turbo-1106", "isSysPromptAllowed": "true" },{ "entityId": "gpt-35-turbo-0613", "isSysPromptAllowed": "true" },{ "entityId": "gpt-35-turbo-0125", "isSysPromptAllowed": "true" },{ "entityId": "gpt-35-turbo-0301", "isSysPromptAllowed": "true" },{ "entityId": "gpt-35-turbo-0613-adapter", "isSysPromptAllowed": "true" },{ "entityId": "gpt-4", "isSysPromptAllowed": "true" },{ "entityId": "gpt-4-1106-preview", "isSysPromptAllowed": "true" },{ "entityId": "gpt-4-0125-preview", "isSysPromptAllowed": "true" },{ "entityId": "gpt-4-turbo-2024-04-09", "isSysPromptAllowed": "true" },{ "entityId": "gpt-4-turbo", "isSysPromptAllowed": "true" },{ "entityId": "gpt-4-32k-0314", "isSysPromptAllowed": "true" },{ "entityId": "gpt-4-32k-0613", "isSysPromptAllowed": "true" },{ "entityId": "gpt-4o-2024-05-13", "isSysPromptAllowed": "true" },{ "entityId": "gpt-4o-2024-08-06", "isSysPromptAllowed": "true" },{ "entityId": "gpt-4o-mini-2024-07-18", "isSysPromptAllowed": "true" },{ "entityId": "amazon.titan-tg1-large", "isSysPromptAllowed": "true" },{ "entityId": "ai21.j2-grande-instruct", "isSysPromptAllowed": "true" },{ "entityId": "ai21.j2-jumbo-instruct", "isSysPromptAllowed": "true" },{ "entityId": "anthropic.claude-instant-v1", "isSysPromptAllowed": "true" },{ "entityId": "anthropic.claude-v2", "isSysPromptAllowed": "true" },{ "entityId": "anthropic.claude-v2-1", "isSysPromptAllowed": "true" },{ "entityId": "anthropic.claude-v3-haiku", "isSysPromptAllowed": "true" },{ "entityId": "anthropic.claude-v3-sonnet", "isSysPromptAllowed": "true" },{ "entityId": "meta.llama3-8b-instruct-v1", "isSysPromptAllowed": "true" },{ "entityId": "meta.llama3-70b-instruct-v1", "isSysPromptAllowed": "true" },{ "entityId": "mistral-large-azure", "isSysPromptAllowed": "true" },{ "entityId": "chat-bison@001", "isSysPromptAllowed": "true" },{ "entityId": "chat-bison-32k@002", "isSysPromptAllowed": "true" },{ "entityId": "codechat-bison@001", "isSysPromptAllowed": "true" },{ "entityId": "codechat-bison-32k@002", "isSysPromptAllowed": "true" },{ "entityId": "gemini-pro", "isSysPromptAllowed": "true" },{ "entityId": "gemini-1.5-pro-preview-0409", "isSysPromptAllowed": "true" },{ "entityId": "gemini-1.5-flash-001", "isSysPromptAllowed": "true" }]'
      entity-simple-request-for-api-tests: '[{ "entityId": "stability.stable-diffusion-xl", "request": "draw smiling emoticon", "isAttachmentResponse": "true"}, { "entityId": "stability.stable-image-core-v1", "request": "draw smiling emoticon", "isAttachmentResponse": "true"}, { "entityId": "stability.stable-image-ultra-v1", "request": "draw smiling emoticon", "isAttachmentResponse": "true"}, { "entityId": "stability.sd3-large-v1", "request": "draw smiling emoticon", "isAttachmentResponse": "true"}, { "entityId": "dall-e-3", "request": "draw smiling emoticon", "isAttachmentResponse": "true"}, { "entityId": "imagegeneration@005", "request": "draw smiling emoticon", "isAttachmentResponse": "true"} ]'
      entity-plus-attachment-for-api-tests: '[{ "entityId": "gpt-4-vision-preview", "attachmentName": "sun.jpg", "response": "sun" },{ "entityId": "gemini-pro-vision", "attachmentName": "sun.jpg", "request": "what is on picture?", "response": "sun" }]'
      models-list-for-tests: '[{"entityId":"gpt-35-turbo-0613-adapter"}, {"entityId":"gpt-35-turbo"}, {"entityId":"gpt-35-turbo-0301"}, {"entityId":"gpt-35-turbo-0613"}, {"entityId":"gpt-35-turbo-1106"}, {"entityId":"gpt-35-turbo-0125"}, {"entityId":"gpt-35-turbo-16k"}, {"entityId":"gpt-4"}, {"entityId":"gpt-4-0613"}, {"entityId":"gpt-4-32k-0314"}, {"entityId":"gpt-4-32k-0613"}, {"entityId":"gpt-4-32k"}, {"entityId":"gpt-4-turbo"}, {"entityId":"gpt-4-1106-preview"}, {"entityId":"gpt-4-0125-preview"}, {"entityId":"gpt-4-turbo-2024-04-09"}, {"entityId":"gpt-4o"}, {"entityId":"gpt-4o-2024-05-13"}, {"entityId":"gpt-4o-2024-08-06"}, {"entityId":"gpt-4o-mini-2024-07-18"}, {"entityId":"gpt-4-vision-preview"}, {"entityId":"dall-e-3"}, {"entityId":"mistral-large-azure"}, {"entityId":"chat-bison"}, {"entityId":"chat-bison@001"}, {"entityId":"chat-bison-32k@002"}, {"entityId":"codechat-bison"}, {"entityId":"codechat-bison@001"}, {"entityId":"codechat-bison-32k@002"}, {"entityId":"gemini-pro"}, {"entityId":"gemini-pro-vision"}, {"entityId":"gemini-1.5-pro-preview-0409"}, {"entityId":"gemini-1.5-flash-001"}, {"entityId":"imagegeneration@005"}, {"entityId":"amazon.titan-tg1-large"}, {"entityId":"ai21.j2-grande-instruct"}, {"entityId":"ai21.j2-jumbo-instruct"}, {"entityId":"anthropic.claude"}, {"entityId":"anthropic.claude-instant-v1"}, {"entityId":"anthropic.claude-v2"}, {"entityId":"anthropic.claude-v2-1"}, {"entityId":"anthropic.claude-v3-sonnet"}, {"entityId":"anthropic.claude-v3-5-sonnet"}, {"entityId":"anthropic.claude-v3-haiku"}, {"entityId":"anthropic.claude-v3-opus"}, {"entityId":"stability.stable-diffusion-xl"}, {"entityId":"stability.stable-image-core-v1"}, {"entityId":"stability.stable-image-ultra-v1"}, {"entityId":"stability.sd3-large-v1"}, {"entityId":"databricks-dbrx-instruct"}, {"entityId":"databricks-mixtral-8x7b-instruct"}, {"entityId":"meta.llama3-8b-instruct-v1"}, {"entityId":"meta.llama3-70b-instruct-v1"}]'
    secrets:
      E2E_ADMIN: ${{ secrets.E2E_ADMIN }}
      E2E_USERNAME: ${{ secrets.E2E_USERNAME }}
      E2E_OVERLAY_USERNAME: ${{ secrets.E2E_OVERLAY_USERNAME }}
      E2E_PASSWORD: ${{ secrets.E2E_PASSWORD }}

actions/e2e_test/action.yml Outdated Show resolved Hide resolved
actions/e2e_test/action.yml Outdated Show resolved Hide resolved
actions/e2e_test/action.yml Outdated Show resolved Hide resolved
actions/e2e_test/action.yml Outdated Show resolved Hide resolved
actions/e2e_test/action.yml Outdated Show resolved Hide resolved
actions/e2e_test/action.yml Outdated Show resolved Hide resolved
actions/e2e_test/action.yml Outdated Show resolved Hide resolved
actions/e2e_test/action.yml Outdated Show resolved Hide resolved
required: true
description: "Comma separated list of usernames for overlay sandbox authentification. The number of users should be equal to number of workers"
type: string
e2e-password:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here and for simular secrets: since the recommended usage is like

        with:
          e2e-admin: ${{ secrets.E2E_ADMIN }}
          e2e-username: ${{ secrets.E2E_USERNAME }}
          e2e-overlay-username: ${{ secrets.E2E_OVERLAY_USERNAME }}
          e2e-password: ${{ secrets.E2E_PASSWORD }}

we can define some defaults like default: ${{ secrets.E2E_PASSWORD }}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nepalevov, AFAIK actions cannot access secrets directly. I tried just in case and got syntax error

Error: epam/ai-dial-ci/gh-e2e-test/actions/e2e_test/action.yml (Line: 19, Col: 14): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.E2E_ADMIN
Error: epam/ai-dial-ci/gh-e2e-test/actions/e2e_test/action.yml (Line: 22, Col: 14): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.E2E_USERNAME
Error: epam/ai-dial-ci/gh-e2e-test/actions/e2e_test/action.yml (Line: 25, Col: 14): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.E2E_OVERLAY_USERNAME
Error: epam/ai-dial-ci/gh-e2e-test/actions/e2e_test/action.yml (Line: 28, Col: 14): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.E2E_PASSWORD
Error: GitHub.DistributedTask.ObjectTemplating.TemplateValidationException: The template is not valid. epam/ai-dial-ci/gh-e2e-test/actions/e2e_test/action.yml (Line: 19, Col: 14): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.E2E_ADMIN,epam/ai-dial-ci/gh-e2e-test/actions/e2e_test/action.yml (Line: 22, Col: 14): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.E2E_USERNAME,epam/ai-dial-ci/gh-e2e-test/actions/e2e_test/action.yml (Line: 25, Col: 14): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.E2E_OVERLAY_USERNAME,epam/ai-dial-ci/gh-e2e-test/actions/e2e_test/action.yml (Line: 28, Col: 14): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.E2E_PASSWORD
   at GitHub.DistributedTask.ObjectTemplating.TemplateValidationErrors.Check()
   at GitHub.Runner.Worker.ActionManifestManager.ConvertRuns(IExecutionContext executionContext, TemplateContext templateContext, TemplateToken inputsToken, String fileRelativePath, MappingToken outputs)
   at GitHub.Runner.Worker.ActionManifestManager.Load(IExecutionContext executionContext, String manifestFile)
Error: Failed to load epam/ai-dial-ci/gh-e2e-test/actions/e2e_test/action.yml

actions/e2e_test/action.yml Outdated Show resolved Hide resolved
@tataranovich tataranovich force-pushed the gh-e2e-test branch 2 times, most recently from dd454df to 5287351 Compare February 6, 2025 12:48
@tataranovich tataranovich marked this pull request as draft February 7, 2025 10:25
@tataranovich tataranovich changed the title feat: action for running E2E test on GitHub feat: workflow to run E2E test on GitHub Feb 7, 2025
@tataranovich tataranovich marked this pull request as ready for review February 7, 2025 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants