aiverify-moonshot 0.6.1__tar.gz → 0.6.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (213) hide show
  1. aiverify_moonshot-0.6.3/.github/workflows/integration-test.yaml +1063 -0
  2. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/.github/workflows/pypi-deployment.yaml +4 -4
  3. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/.github/workflows/sca-scan.yaml +1 -1
  4. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/.github/workflows/smoke-test.yaml +15 -5
  5. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/.github/workflows/test-pypi-deployment.yaml +2 -2
  6. aiverify_moonshot-0.6.3/NOTICES.md +1187 -0
  7. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/PKG-INFO +3 -2
  8. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/README.md +1 -1
  9. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/__main__.py +9 -0
  10. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/cli/__main__.py +1 -3
  11. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/cli/redteam/session.py +8 -8
  12. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/app.py +1 -1
  13. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/routes/benchmark_result.py +1 -0
  14. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/routes/bookmark.py +5 -2
  15. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/routes/context_strategy.py +3 -1
  16. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/routes/dataset.py +32 -4
  17. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/routes/prompt_template.py +1 -0
  18. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/schemas/cookbook_create_dto.py +4 -2
  19. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/schemas/dataset_create_dto.py +3 -3
  20. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/schemas/prompt_response_model.py +0 -1
  21. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/schemas/recipe_create_dto.py +2 -1
  22. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/services/context_strategy_service.py +1 -4
  23. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/services/cookbook_service.py +0 -2
  24. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/services/dataset_service.py +4 -3
  25. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/services/session_service.py +5 -5
  26. aiverify_moonshot-0.6.3/moonshot/integrations/web_api/services/utils/exceptions_handler.py +78 -0
  27. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/services/utils/results_formatter.py +25 -16
  28. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/api/api_dataset.py +52 -12
  29. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/cookbooks/cookbook_arguments.py +1 -1
  30. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/datasets/dataset.py +19 -3
  31. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/redteaming/attack/attack_module.py +9 -3
  32. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/pyproject.toml +5 -3
  33. aiverify_moonshot-0.6.3/requirements.txt +61 -0
  34. aiverify_moonshot-0.6.1/.github/workflows/integration-test.yaml +0 -205
  35. aiverify_moonshot-0.6.1/NOTICES.md +0 -2506
  36. aiverify_moonshot-0.6.1/moonshot/integrations/web_api/services/utils/exceptions_handler.py +0 -41
  37. aiverify_moonshot-0.6.1/requirements.txt +0 -59
  38. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/.coveragerc +0 -0
  39. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/.flake8 +0 -0
  40. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/.github/developing-workflows.md +0 -0
  41. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/.github/pull_request_template.md +0 -0
  42. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/.github/scripts/create_backup.sh +0 -0
  43. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/.github/scripts/install_ms_service.sh +0 -0
  44. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/.github/scripts/moonshot_env +0 -0
  45. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/.github/scripts/moonshot_test_env +0 -0
  46. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/.github/scripts/moonshot_ui_env +0 -0
  47. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/.github/scripts/run_smoke_test.sh +0 -0
  48. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/.github/scripts/start_ms_service.sh +0 -0
  49. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/.github/workflows/docs-update.yaml +0 -0
  50. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/.github/workflows/gh-event-notification.yaml +0 -0
  51. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/.github/workflows/notices-file-gen.yaml +0 -0
  52. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/.github/workflows/pre-build-checks.yaml +0 -0
  53. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/.github/workflows/sast-codeql.yaml +0 -0
  54. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/.github/workflows/sit-build.yaml +0 -0
  55. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/.github/workflows/smoke-test-cli.yaml +0 -0
  56. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/.github/workflows/uat-build.yaml +0 -0
  57. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/.gitignore +0 -0
  58. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/.pre-commit-config.yaml +0 -0
  59. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/AUTHORS.md +0 -0
  60. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/LICENSE.md +0 -0
  61. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/__init__.py +0 -0
  62. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/api.py +0 -0
  63. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/__init__.py +0 -0
  64. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/cli/__init__.py +0 -0
  65. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/cli/active_session_cfg.py +0 -0
  66. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/cli/benchmark/__init__.py +0 -0
  67. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/cli/benchmark/benchmark.py +0 -0
  68. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/cli/benchmark/cookbook.py +0 -0
  69. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/cli/benchmark/datasets.py +0 -0
  70. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/cli/benchmark/metrics.py +0 -0
  71. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/cli/benchmark/recipe.py +0 -0
  72. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/cli/benchmark/result.py +0 -0
  73. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/cli/benchmark/run.py +0 -0
  74. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/cli/benchmark/runner.py +0 -0
  75. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/cli/cli.py +0 -0
  76. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/cli/cli_errors.py +0 -0
  77. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/cli/common/__init__.py +0 -0
  78. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/cli/common/common.py +0 -0
  79. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/cli/common/connectors.py +0 -0
  80. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/cli/common/dataset.py +0 -0
  81. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/cli/common/display_helper.py +0 -0
  82. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/cli/common/prompt_template.py +0 -0
  83. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/cli/initialisation/__init__.py +0 -0
  84. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/cli/initialisation/initialisation.py +0 -0
  85. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/cli/redteam/__init__.py +0 -0
  86. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/cli/redteam/attack_module.py +0 -0
  87. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/cli/redteam/context_strategy.py +0 -0
  88. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/cli/redteam/prompt_template.py +0 -0
  89. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/cli/redteam/redteam.py +0 -0
  90. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/cli/utils/process_data.py +0 -0
  91. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/.env.dev +0 -0
  92. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/__init__.py +0 -0
  93. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/__main__.py +0 -0
  94. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/container.py +0 -0
  95. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/log/.gitkeep +0 -0
  96. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/logging_conf.py +0 -0
  97. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/routes/__init__.py +0 -0
  98. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/routes/attack_modules.py +0 -0
  99. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/routes/benchmark.py +0 -0
  100. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/routes/cookbook.py +0 -0
  101. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/routes/endpoint.py +0 -0
  102. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/routes/metric.py +0 -0
  103. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/routes/recipe.py +0 -0
  104. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/routes/redteam.py +0 -0
  105. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/routes/runner.py +0 -0
  106. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/schemas/__init__.py +0 -0
  107. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/schemas/benchmark_runner_dto.py +0 -0
  108. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/schemas/bookmark_create_dto.py +0 -0
  109. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/schemas/cookbook_response_model.py +0 -0
  110. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/schemas/dataset_response_dto.py +0 -0
  111. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/schemas/endpoint_create_dto.py +0 -0
  112. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/schemas/endpoint_response_model.py +0 -0
  113. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/schemas/prompt_template_response_model.py +0 -0
  114. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/schemas/recipe_response_model.py +0 -0
  115. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/schemas/session_create_dto.py +0 -0
  116. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/schemas/session_prompt_dto.py +0 -0
  117. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/schemas/session_response_model.py +0 -0
  118. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/services/__init__.py +0 -0
  119. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/services/attack_module_service.py +0 -0
  120. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/services/auto_red_team_test_manager.py +0 -0
  121. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/services/auto_red_team_test_state.py +0 -0
  122. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/services/base_service.py +0 -0
  123. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/services/benchmark_result_service.py +0 -0
  124. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/services/benchmark_test_manager.py +0 -0
  125. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/services/benchmark_test_state.py +0 -0
  126. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/services/benchmarking_service.py +0 -0
  127. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/services/bookmark_service.py +0 -0
  128. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/services/endpoint_service.py +0 -0
  129. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/services/metric_service.py +0 -0
  130. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/services/prompt_template_service.py +0 -0
  131. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/services/recipe_service.py +0 -0
  132. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/services/runner_service.py +0 -0
  133. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/services/utils/file_manager.py +0 -0
  134. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/status_updater/interface/benchmark_progress_callback.py +3 -3
  135. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/status_updater/interface/redteam_progress_callback.py +3 -3
  136. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/status_updater/moonshot_ui_webhook.py +0 -0
  137. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/temp/.gitkeep +0 -0
  138. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/integrations/web_api/types/types.py +0 -0
  139. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/__init__.py +0 -0
  140. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/api/__init__.py +0 -0
  141. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/api/api_bookmark.py +0 -0
  142. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/api/api_connector.py +0 -0
  143. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/api/api_connector_endpoint.py +0 -0
  144. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/api/api_context_strategy.py +0 -0
  145. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/api/api_cookbook.py +0 -0
  146. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/api/api_environment_variables.py +0 -0
  147. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/api/api_metrics.py +0 -0
  148. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/api/api_prompt_template.py +0 -0
  149. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/api/api_recipe.py +0 -0
  150. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/api/api_red_teaming.py +0 -0
  151. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/api/api_result.py +0 -0
  152. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/api/api_run.py +0 -0
  153. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/api/api_runner.py +0 -0
  154. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/api/api_session.py +0 -0
  155. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/bookmark/bookmark.py +0 -0
  156. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/bookmark/bookmark_arguments.py +0 -0
  157. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/configs/__init__.py +0 -0
  158. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/configs/env_variables.py +0 -0
  159. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/connectors/__init__.py +0 -0
  160. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/connectors/connector.py +0 -0
  161. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/connectors/connector_prompt_arguments.py +0 -0
  162. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/connectors/connector_response.py +0 -0
  163. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/connectors_endpoints/__init__.py +0 -0
  164. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/connectors_endpoints/connector_endpoint.py +0 -0
  165. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/connectors_endpoints/connector_endpoint_arguments.py +0 -0
  166. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/cookbooks/__init__.py +0 -0
  167. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/cookbooks/cookbook.py +0 -0
  168. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/datasets/__init__.py +0 -0
  169. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/datasets/dataset_arguments.py +0 -0
  170. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/messages_constants.py +0 -0
  171. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/metrics/__init__.py +0 -0
  172. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/metrics/metric.py +0 -0
  173. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/metrics/metric_interface.py +0 -0
  174. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/prompt_templates/__init__.py +0 -0
  175. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/prompt_templates/prompt_template.py +0 -0
  176. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/recipes/__init__.py +0 -0
  177. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/recipes/recipe.py +0 -0
  178. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/recipes/recipe_arguments.py +0 -0
  179. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/redteaming/__init__.py +0 -0
  180. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/redteaming/attack/__init__.py +0 -0
  181. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/redteaming/attack/attack_module_arguments.py +0 -0
  182. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/redteaming/attack/context_strategy.py +0 -0
  183. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/redteaming/context_strategy/__init__.py +0 -0
  184. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/redteaming/context_strategy/context_strategy_interface.py +0 -0
  185. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/redteaming/session/__init__.py +0 -0
  186. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/redteaming/session/chat.py +0 -0
  187. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/redteaming/session/red_teaming_progress.py +0 -0
  188. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/redteaming/session/red_teaming_type.py +0 -0
  189. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/redteaming/session/session.py +0 -0
  190. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/results/__init__.py +0 -0
  191. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/results/result.py +0 -0
  192. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/results/result_arguments.py +0 -0
  193. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/runners/__init__.py +0 -0
  194. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/runners/runner.py +0 -0
  195. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/runners/runner_arguments.py +0 -0
  196. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/runners/runner_type.py +0 -0
  197. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/runs/__init__.py +0 -0
  198. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/runs/run.py +0 -0
  199. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/runs/run_arguments.py +0 -0
  200. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/runs/run_progress.py +0 -0
  201. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/runs/run_status.py +0 -0
  202. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/storage/__init__.py +0 -0
  203. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/storage/db_interface.py +0 -0
  204. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/storage/io_interface.py +0 -0
  205. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/storage/storage.py +0 -0
  206. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/utils/__init__.py +0 -0
  207. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/utils/find_feature.py +0 -0
  208. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/utils/import_modules.py +0 -0
  209. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/utils/log.py +0 -0
  210. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/utils/pagination.py +0 -0
  211. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/moonshot/src/utils/timeit.py +0 -0
  212. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/third-party/pygments-2.18.0-py3-none-any.whl +0 -0
  213. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.3}/third-party/text_unidecode-1.3-py2.py3-none-any.whl +0 -0
@@ -0,0 +1,1063 @@
1
+ # Integration Test
2
+
3
+ name: Moonshot Integration Test
4
+
5
+ on:
6
+ # Runs on Pull Request Review
7
+ pull_request_review:
8
+ branches:
9
+ - 'main'
10
+
11
+ # Run this workflow manually from Actions tab
12
+ workflow_dispatch:
13
+ inputs:
14
+ moonshot_branch:
15
+ description: 'Moonshot Branch / Tag Name'
16
+ required: true
17
+ default: 'main'
18
+ type: string
19
+ moonshot_data_branch:
20
+ description: 'Moonshot Data Branch / Tag Name'
21
+ required: true
22
+ default: 'main'
23
+ type: string
24
+ moonshot_ui_branch:
25
+ description: 'Moonshot UI Branch / Tag Name'
26
+ required: true
27
+ default: 'main'
28
+ type: string
29
+
30
+ # Allow one concurrent deployment
31
+ concurrency:
32
+ group: ${{ github.repository }}-${{ github.workflow }}
33
+ cancel-in-progress: true
34
+
35
+ jobs:
36
+ integration-ui-test-endpoint:
37
+
38
+ runs-on: ubuntu-latest
39
+ timeout-minutes: 300
40
+
41
+ steps:
42
+
43
+ - name: Checkout Moonshot (Pull Request Review)
44
+ if: github.event_name == 'pull_request_review'
45
+ uses: actions/checkout@v4
46
+ with:
47
+ repository: ${{ github.event.pull_request.head.repo.full_name }}
48
+ ref: ${{ github.event.pull_request.head.ref }}
49
+
50
+ - name: Checkout Moonshot (Workflow Dispatch)
51
+ if: github.event_name == 'workflow_dispatch'
52
+ uses: actions/checkout@v4
53
+ with:
54
+ repository: aiverify-foundation/moonshot
55
+ ref: ${{ inputs.moonshot_branch }}
56
+
57
+ - name: Setup Python 3.11
58
+ uses: actions/setup-python@v4
59
+ with:
60
+ python-version: '3.11'
61
+
62
+ - name: Setup Moonshot
63
+ run: |
64
+ python -m venv venv
65
+ source venv/bin/activate
66
+ pip install -r requirements.txt
67
+ touch .env
68
+ echo "${{ secrets.ENVIRONMENT_VARS }}" >> .env
69
+
70
+ - name: Checkout Moonshot Data (Pull Request Review)
71
+ if: github.event_name == 'pull_request_review'
72
+ uses: actions/checkout@v4
73
+ with:
74
+ repository: aiverify-foundation/moonshot-data
75
+ ref: ${{ vars.MOONSHOT_DATA_BRANCH }}
76
+ path: moonshot-data
77
+
78
+ - name: Checkout Moonshot Data (Workflow Dispatch)
79
+ if: github.event_name == 'workflow_dispatch'
80
+ uses: actions/checkout@v4
81
+ with:
82
+ repository: aiverify-foundation/moonshot-data
83
+ ref: ${{ inputs.moonshot_data_branch }}
84
+ path: moonshot-data
85
+
86
+ - name: Setup Moonshot Data
87
+ run: |
88
+ source venv/bin/activate
89
+ cd moonshot-data
90
+ pip install -r requirements.txt
91
+
92
+ - name: Checkout Moonshot UI (Pull Request Review)
93
+ if: github.event_name == 'pull_request_review'
94
+ uses: actions/checkout@v4
95
+ with:
96
+ repository: aiverify-foundation/moonshot-ui
97
+ ref: ${{ vars.MOONSHOT_UI_BRANCH }}
98
+ path: moonshot-ui
99
+
100
+ - name: Checkout Moonshot UI (Workflow Dispatch)
101
+ if: github.event_name == 'workflow_dispatch'
102
+ uses: actions/checkout@v4
103
+ with:
104
+ repository: aiverify-foundation/moonshot-ui
105
+ ref: ${{ inputs.moonshot_ui_branch }}
106
+ path: moonshot-ui
107
+
108
+ # Download NLTK stopwords
109
+ - name: Download NLTK stopwords
110
+ run: |
111
+ source venv/bin/activate
112
+ pip install nltk
113
+ python -c "import nltk; nltk.download('stopwords');nltk.download('punkt');nltk.download('punkt_tab');nltk.download('averaged_perceptron_tagger_eng')"
114
+
115
+ - name: Setup Moonshot UI
116
+ run: |
117
+ source venv/bin/activate
118
+ cd moonshot-ui
119
+ npm install
120
+ npm run build
121
+ cd ../
122
+ nohup python -m moonshot web &
123
+
124
+ - name: Checkout Integration Test
125
+ uses: actions/checkout@v4
126
+ with:
127
+ repository: aiverify-foundation/moonshot-integration-testing
128
+ path: moonshot-integration-testing
129
+
130
+ - name: Run Integration UI Test
131
+ env:
132
+ URI: ${{ secrets.URI }}
133
+ TOKEN: ${{ secrets.TOKEN }}
134
+ URI2: ${{ secrets.URI2 }}
135
+ TOKEN2: ${{ secrets.TOKEN2 }}
136
+ ADDITIONAL_PARAMETERS: ${{ secrets.ADDITIONAL_PARAMETERS }}
137
+ TOGETHER_TOKEN: ${{ secrets.TOGETHER_TOKEN }}
138
+ OPENAI_TOKEN: ${{ secrets.OPENAI_TOKEN }}
139
+ AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
140
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
141
+ GOOGLE_TOKEN: ${{ secrets.GOOGLE_TOKEN }}
142
+ H2OGPT_TOKEN: ${{ secrets.H2OGPT_TOKEN }}
143
+ id: integrationuitest
144
+ run: |
145
+ source venv/bin/activate
146
+ cd moonshot-integration-testing/ui-integration-testing
147
+ npm ci
148
+ npx playwright install
149
+ npx playwright install-deps
150
+ npm install dotenv --save
151
+ # echo "Running UI Endpoint Test Cases"
152
+ URI="$URI" TOKEN="$TOKEN" URI2="$URI2" TOKEN2="$TOKEN2" ADDITIONAL_PARAMETERS="$ADDITIONAL_PARAMETERS" TOGETHER_TOKEN="$TOGETHER_TOKEN" OPENAI_TOKEN="$OPENAI_TOKEN" AWS_ACCESS_KEY_ID="$AWS_ACCESS_KEY_ID" AWS_SECRET_ACCESS_KEY="$AWS_SECRET_ACCESS_KEY" GOOGLE_TOKEN="$GOOGLE_TOKEN" H2OGPT_TOKEN="$H2OGPT_TOKEN" DEBUG=pw:api npx playwright test tests/endpoint.spec.ts
153
+
154
+ - name: Print Environment Variables
155
+ run: env
156
+
157
+ - name: Upload Playwright Traces
158
+ if: always()
159
+ uses: actions/upload-artifact@v4
160
+ with:
161
+ name: playwright-trace-integration-ui-test-endpoint-${{ github.run_id }}
162
+ path: |
163
+ /home/runner/work/moonshot/moonshot/moonshot-integration-testing/ui-integration-testing/test-results
164
+
165
+ - name: TestRail upload results
166
+ env:
167
+ TESTRAIL_USERNAME: ${{ secrets.TESTRAIL_USERNAME }}
168
+ TESTRAIL_PASSWORD: ${{ secrets.TESTRAIL_PASSWORD }}
169
+ run: |
170
+ cd moonshot-integration-testing/ui-integration-testing
171
+ pip install trcli
172
+ trcli -y \
173
+ -h https://imdabtg.testrail.io/ \
174
+ --project "Moonshot" \
175
+ -u $TESTRAIL_USERNAME \
176
+ -p $TESTRAIL_PASSWORD \
177
+ parse_junit \
178
+ --title "Moonshot" \
179
+ --result-fields "os:Ubuntu 22.04" \
180
+ --milestone-id "5" \
181
+ --run-description ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \
182
+ -f "./test-results/junit-report.xml"
183
+ ##########################################################################################################################################################################
184
+ integration-ui-test-homepage:
185
+
186
+ runs-on: ubuntu-latest
187
+ timeout-minutes: 300
188
+
189
+ steps:
190
+
191
+ - name: Checkout Moonshot (Pull Request Review)
192
+ if: github.event_name == 'pull_request_review'
193
+ uses: actions/checkout@v4
194
+ with:
195
+ repository: ${{ github.event.pull_request.head.repo.full_name }}
196
+ ref: ${{ github.event.pull_request.head.ref }}
197
+
198
+ - name: Checkout Moonshot (Workflow Dispatch)
199
+ if: github.event_name == 'workflow_dispatch'
200
+ uses: actions/checkout@v4
201
+ with:
202
+ repository: aiverify-foundation/moonshot
203
+ ref: ${{ inputs.moonshot_branch }}
204
+
205
+ - name: Setup Python 3.11
206
+ uses: actions/setup-python@v4
207
+ with:
208
+ python-version: '3.11'
209
+
210
+ - name: Setup Moonshot
211
+ run: |
212
+ python -m venv venv
213
+ source venv/bin/activate
214
+ pip install -r requirements.txt
215
+ touch .env
216
+ echo "${{ secrets.ENVIRONMENT_VARS }}" >> .env
217
+
218
+ - name: Checkout Moonshot Data (Pull Request Review)
219
+ if: github.event_name == 'pull_request_review'
220
+ uses: actions/checkout@v4
221
+ with:
222
+ repository: aiverify-foundation/moonshot-data
223
+ ref: ${{ vars.MOONSHOT_DATA_BRANCH }}
224
+ path: moonshot-data
225
+
226
+ - name: Checkout Moonshot Data (Workflow Dispatch)
227
+ if: github.event_name == 'workflow_dispatch'
228
+ uses: actions/checkout@v4
229
+ with:
230
+ repository: aiverify-foundation/moonshot-data
231
+ ref: ${{ inputs.moonshot_data_branch }}
232
+ path: moonshot-data
233
+
234
+ - name: Setup Moonshot Data
235
+ run: |
236
+ source venv/bin/activate
237
+ cd moonshot-data
238
+ pip install -r requirements.txt
239
+
240
+ - name: Checkout Moonshot UI (Pull Request Review)
241
+ if: github.event_name == 'pull_request_review'
242
+ uses: actions/checkout@v4
243
+ with:
244
+ repository: aiverify-foundation/moonshot-ui
245
+ ref: ${{ vars.MOONSHOT_UI_BRANCH }}
246
+ path: moonshot-ui
247
+
248
+ - name: Checkout Moonshot UI (Workflow Dispatch)
249
+ if: github.event_name == 'workflow_dispatch'
250
+ uses: actions/checkout@v4
251
+ with:
252
+ repository: aiverify-foundation/moonshot-ui
253
+ ref: ${{ inputs.moonshot_ui_branch }}
254
+ path: moonshot-ui
255
+
256
+ # Download NLTK stopwords
257
+ - name: Download NLTK stopwords
258
+ run: |
259
+ source venv/bin/activate
260
+ pip install nltk
261
+ python -c "import nltk; nltk.download('stopwords');nltk.download('punkt');nltk.download('punkt_tab');nltk.download('averaged_perceptron_tagger_eng')"
262
+
263
+ - name: Setup Moonshot UI
264
+ run: |
265
+ source venv/bin/activate
266
+ cd moonshot-ui
267
+ npm install
268
+ npm run build
269
+ cd ../
270
+ nohup python -m moonshot web &
271
+
272
+ - name: Checkout Integration Test
273
+ uses: actions/checkout@v4
274
+ with:
275
+ repository: aiverify-foundation/moonshot-integration-testing
276
+ path: moonshot-integration-testing
277
+
278
+ - name: Run Integration UI Test
279
+ env:
280
+ URI: ${{ secrets.URI }}
281
+ TOKEN: ${{ secrets.TOKEN }}
282
+ URI2: ${{ secrets.URI2 }}
283
+ TOKEN2: ${{ secrets.TOKEN2 }}
284
+ ADDITIONAL_PARAMETERS: ${{ secrets.ADDITIONAL_PARAMETERS }}
285
+ TOGETHER_TOKEN: ${{ secrets.TOGETHER_TOKEN }}
286
+ OPENAI_TOKEN: ${{ secrets.OPENAI_TOKEN }}
287
+ AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
288
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
289
+ GOOGLE_TOKEN: ${{ secrets.GOOGLE_TOKEN }}
290
+ H2OGPT_TOKEN: ${{ secrets.H2OGPT_TOKEN }}
291
+ id: integrationuitest
292
+ run: |
293
+ source venv/bin/activate
294
+ cd moonshot-integration-testing/ui-integration-testing
295
+ npm ci
296
+ npx playwright install
297
+ npx playwright install-deps
298
+ npm install dotenv --save
299
+ # echo "Running Homepage Test Cases"
300
+ URI="$URI" TOKEN="$TOKEN" URI2="$URI2" TOKEN2="$TOKEN2" ADDITIONAL_PARAMETERS="$ADDITIONAL_PARAMETERS" TOGETHER_TOKEN="$TOGETHER_TOKEN" OPENAI_TOKEN="$OPENAI_TOKEN" AWS_ACCESS_KEY_ID="$AWS_ACCESS_KEY_ID" AWS_SECRET_ACCESS_KEY="$AWS_SECRET_ACCESS_KEY" GOOGLE_TOKEN="$GOOGLE_TOKEN" H2OGPT_TOKEN="$H2OGPT_TOKEN" DEBUG=pw:api npx playwright test tests/homepage.spec.ts
301
+
302
+ - name: Print Environment Variables
303
+ run: env
304
+
305
+ - name: Upload Playwright Traces
306
+ if: always()
307
+ uses: actions/upload-artifact@v4
308
+ with:
309
+ name: playwright-trace-integration-ui-test-homepage-${{ github.run_id }}
310
+ path: |
311
+ /home/runner/work/moonshot/moonshot/moonshot-integration-testing/ui-integration-testing/test-results
312
+
313
+ - name: TestRail upload results
314
+ env:
315
+ TESTRAIL_USERNAME: ${{ secrets.TESTRAIL_USERNAME }}
316
+ TESTRAIL_PASSWORD: ${{ secrets.TESTRAIL_PASSWORD }}
317
+ run: |
318
+ cd moonshot-integration-testing/ui-integration-testing
319
+ pip install trcli
320
+ trcli -y \
321
+ -h https://imdabtg.testrail.io/ \
322
+ --project "Moonshot" \
323
+ -u $TESTRAIL_USERNAME \
324
+ -p $TESTRAIL_PASSWORD \
325
+ parse_junit \
326
+ --title "Moonshot" \
327
+ --result-fields "os:Ubuntu 22.04" \
328
+ --milestone-id "5" \
329
+ --run-description ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \
330
+ -f "./test-results/junit-report.xml"
331
+ ##########################################################################################################################################################################
332
+ integration-ui-test-benchmarking:
333
+
334
+ runs-on: ubuntu-latest
335
+ timeout-minutes: 300
336
+
337
+ steps:
338
+
339
+ - name: Checkout Moonshot (Pull Request Review)
340
+ if: github.event_name == 'pull_request_review'
341
+ uses: actions/checkout@v4
342
+ with:
343
+ repository: ${{ github.event.pull_request.head.repo.full_name }}
344
+ ref: ${{ github.event.pull_request.head.ref }}
345
+
346
+ - name: Checkout Moonshot (Workflow Dispatch)
347
+ if: github.event_name == 'workflow_dispatch'
348
+ uses: actions/checkout@v4
349
+ with:
350
+ repository: aiverify-foundation/moonshot
351
+ ref: ${{ inputs.moonshot_branch }}
352
+
353
+ - name: Setup Python 3.11
354
+ uses: actions/setup-python@v4
355
+ with:
356
+ python-version: '3.11'
357
+
358
+ - name: Setup Moonshot
359
+ run: |
360
+ python -m venv venv
361
+ source venv/bin/activate
362
+ pip install -r requirements.txt
363
+ touch .env
364
+ echo "${{ secrets.ENVIRONMENT_VARS }}" >> .env
365
+
366
+ - name: Checkout Moonshot Data (Pull Request Review)
367
+ if: github.event_name == 'pull_request_review'
368
+ uses: actions/checkout@v4
369
+ with:
370
+ repository: aiverify-foundation/moonshot-data
371
+ ref: ${{ vars.MOONSHOT_DATA_BRANCH }}
372
+ path: moonshot-data
373
+
374
+ - name: Checkout Moonshot Data (Workflow Dispatch)
375
+ if: github.event_name == 'workflow_dispatch'
376
+ uses: actions/checkout@v4
377
+ with:
378
+ repository: aiverify-foundation/moonshot-data
379
+ ref: ${{ inputs.moonshot_data_branch }}
380
+ path: moonshot-data
381
+
382
+ - name: Setup Moonshot Data
383
+ run: |
384
+ source venv/bin/activate
385
+ cd moonshot-data
386
+ pip install -r requirements.txt
387
+
388
+ - name: Checkout Moonshot UI (Pull Request Review)
389
+ if: github.event_name == 'pull_request_review'
390
+ uses: actions/checkout@v4
391
+ with:
392
+ repository: aiverify-foundation/moonshot-ui
393
+ ref: ${{ vars.MOONSHOT_UI_BRANCH }}
394
+ path: moonshot-ui
395
+
396
+ - name: Checkout Moonshot UI (Workflow Dispatch)
397
+ if: github.event_name == 'workflow_dispatch'
398
+ uses: actions/checkout@v4
399
+ with:
400
+ repository: aiverify-foundation/moonshot-ui
401
+ ref: ${{ inputs.moonshot_ui_branch }}
402
+ path: moonshot-ui
403
+
404
+ # Download NLTK stopwords
405
+ - name: Download NLTK stopwords
406
+ run: |
407
+ source venv/bin/activate
408
+ pip install nltk
409
+ python -c "import nltk; nltk.download('stopwords');nltk.download('punkt');nltk.download('punkt_tab');nltk.download('averaged_perceptron_tagger_eng')"
410
+
411
+ - name: Setup Moonshot UI
412
+ env:
413
+ URI: ${{ secrets.URI }}
414
+ TOKEN: ${{ secrets.TOKEN }}
415
+ URI2: ${{ secrets.URI2 }}
416
+ TOKEN2: ${{ secrets.TOKEN2 }}
417
+ ADDITIONAL_PARAMETERS: ${{ secrets.ADDITIONAL_PARAMETERS }}
418
+ TOGETHER_TOKEN: ${{ secrets.TOGETHER_TOKEN }}
419
+ OPENAI_TOKEN: ${{ secrets.OPENAI_TOKEN }}
420
+ AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
421
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
422
+ GOOGLE_TOKEN: ${{ secrets.GOOGLE_TOKEN }}
423
+ H2OGPT_TOKEN: ${{ secrets.H2OGPT_TOKEN }}
424
+ run: |
425
+ source venv/bin/activate
426
+ cd moonshot-ui
427
+ npm install
428
+ npm run build
429
+ cd ../
430
+ nohup python -m moonshot web &
431
+
432
+ - name: Checkout Integration Test
433
+ uses: actions/checkout@v4
434
+ with:
435
+ repository: aiverify-foundation/moonshot-integration-testing
436
+ path: moonshot-integration-testing
437
+
438
+ - name: Run Integration UI Test
439
+ env:
440
+ URI: ${{ secrets.URI }}
441
+ TOKEN: ${{ secrets.TOKEN }}
442
+ URI2: ${{ secrets.URI2 }}
443
+ TOKEN2: ${{ secrets.TOKEN2 }}
444
+ ADDITIONAL_PARAMETERS: ${{ secrets.ADDITIONAL_PARAMETERS }}
445
+ TOGETHER_TOKEN: ${{ secrets.TOGETHER_TOKEN }}
446
+ OPENAI_TOKEN: ${{ secrets.OPENAI_TOKEN }}
447
+ AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
448
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
449
+ GOOGLE_TOKEN: ${{ secrets.GOOGLE_TOKEN }}
450
+ H2OGPT_TOKEN: ${{ secrets.H2OGPT_TOKEN }}
451
+ id: integrationuitest
452
+ run: |
453
+ source venv/bin/activate
454
+ cd moonshot-integration-testing/ui-integration-testing
455
+ npm ci
456
+ npx playwright install
457
+ npx playwright install-deps
458
+ npm install dotenv --save
459
+ echo "Running Benchmarking UI Test Cases"
460
+ URI="$URI" TOKEN="$TOKEN" URI2="$URI2" TOKEN2="$TOKEN2" ADDITIONAL_PARAMETERS="$ADDITIONAL_PARAMETERS" TOGETHER_TOKEN="$TOGETHER_TOKEN" OPENAI_TOKEN="$OPENAI_TOKEN" AWS_ACCESS_KEY_ID="$AWS_ACCESS_KEY_ID" AWS_SECRET_ACCESS_KEY="$AWS_SECRET_ACCESS_KEY" GOOGLE_TOKEN="$GOOGLE_TOKEN" H2OGPT_TOKEN="$H2OGPT_TOKEN" DEBUG=pw:api npx playwright test tests/benchmarking.spec.ts
461
+
462
+ - name: Print Environment Variables
463
+ run: env
464
+
465
+ - name: Upload Playwright Traces
466
+ if: always()
467
+ uses: actions/upload-artifact@v4
468
+ with:
469
+ name: playwright-trace-integration-ui-test-benchmarking-${{ github.run_id }}
470
+ path: |
471
+ /home/runner/work/moonshot/moonshot/moonshot-integration-testing/ui-integration-testing/test-results
472
+
473
+ - name: TestRail upload results
474
+ env:
475
+ TESTRAIL_USERNAME: ${{ secrets.TESTRAIL_USERNAME }}
476
+ TESTRAIL_PASSWORD: ${{ secrets.TESTRAIL_PASSWORD }}
477
+ run: |
478
+ cd moonshot-integration-testing/ui-integration-testing
479
+ pip install trcli
480
+ trcli -y \
481
+ -h https://imdabtg.testrail.io/ \
482
+ --project "Moonshot" \
483
+ -u $TESTRAIL_USERNAME \
484
+ -p $TESTRAIL_PASSWORD \
485
+ parse_junit \
486
+ --title "Moonshot" \
487
+ --result-fields "os:Ubuntu 22.04" \
488
+ --milestone-id "5" \
489
+ --run-description ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \
490
+ -f "./test-results/junit-report.xml"
491
+
492
+ ##########################################################################################################################################################################
493
+ integration-ui-test-red-teaming:
494
+
495
+ runs-on: ubuntu-latest
496
+ timeout-minutes: 300
497
+
498
+ steps:
499
+
500
+ - name: Checkout Moonshot (Pull Request Review)
501
+ if: github.event_name == 'pull_request_review'
502
+ uses: actions/checkout@v4
503
+ with:
504
+ repository: ${{ github.event.pull_request.head.repo.full_name }}
505
+ ref: ${{ github.event.pull_request.head.ref }}
506
+
507
+ - name: Checkout Moonshot (Workflow Dispatch)
508
+ if: github.event_name == 'workflow_dispatch'
509
+ uses: actions/checkout@v4
510
+ with:
511
+ repository: aiverify-foundation/moonshot
512
+ ref: ${{ inputs.moonshot_branch }}
513
+
514
+ - name: Setup Python 3.11
515
+ uses: actions/setup-python@v4
516
+ with:
517
+ python-version: '3.11'
518
+
519
+ - name: Setup Moonshot
520
+ run: |
521
+ python -m venv venv
522
+ source venv/bin/activate
523
+ pip install -r requirements.txt
524
+ touch .env
525
+ echo "${{ secrets.ENVIRONMENT_VARS }}" >> .env
526
+
527
+ - name: Checkout Moonshot Data (Pull Request Review)
528
+ if: github.event_name == 'pull_request_review'
529
+ uses: actions/checkout@v4
530
+ with:
531
+ repository: aiverify-foundation/moonshot-data
532
+ ref: ${{ vars.MOONSHOT_DATA_BRANCH }}
533
+ path: moonshot-data
534
+
535
+ - name: Checkout Moonshot Data (Workflow Dispatch)
536
+ if: github.event_name == 'workflow_dispatch'
537
+ uses: actions/checkout@v4
538
+ with:
539
+ repository: aiverify-foundation/moonshot-data
540
+ ref: ${{ inputs.moonshot_data_branch }}
541
+ path: moonshot-data
542
+
543
+ - name: Setup Moonshot Data
544
+ run: |
545
+ source venv/bin/activate
546
+ cd moonshot-data
547
+ pip install -r requirements.txt
548
+
549
+ - name: Checkout Moonshot UI (Pull Request Review)
550
+ if: github.event_name == 'pull_request_review'
551
+ uses: actions/checkout@v4
552
+ with:
553
+ repository: aiverify-foundation/moonshot-ui
554
+ ref: ${{ vars.MOONSHOT_UI_BRANCH }}
555
+ path: moonshot-ui
556
+
557
+ - name: Checkout Moonshot UI (Workflow Dispatch)
558
+ if: github.event_name == 'workflow_dispatch'
559
+ uses: actions/checkout@v4
560
+ with:
561
+ repository: aiverify-foundation/moonshot-ui
562
+ ref: ${{ inputs.moonshot_ui_branch }}
563
+ path: moonshot-ui
564
+
565
+ # Download NLTK stopwords
566
+ - name: Download NLTK stopwords
567
+ run: |
568
+ source venv/bin/activate
569
+ pip install nltk
570
+ python -c "import nltk; nltk.download('stopwords');nltk.download('punkt');nltk.download('punkt_tab');nltk.download('averaged_perceptron_tagger_eng')"
571
+
572
+ - name: Setup Moonshot UI
573
+ env:
574
+ URI: ${{ secrets.URI }}
575
+ TOKEN: ${{ secrets.TOKEN }}
576
+ URI2: ${{ secrets.URI2 }}
577
+ TOKEN2: ${{ secrets.TOKEN2 }}
578
+ ADDITIONAL_PARAMETERS: ${{ secrets.ADDITIONAL_PARAMETERS }}
579
+ TOGETHER_TOKEN: ${{ secrets.TOGETHER_TOKEN }}
580
+ OPENAI_TOKEN: ${{ secrets.OPENAI_TOKEN }}
581
+ AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
582
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
583
+ GOOGLE_TOKEN: ${{ secrets.GOOGLE_TOKEN }}
584
+ H2OGPT_TOKEN: ${{ secrets.H2OGPT_TOKEN }}
585
+ run: |
586
+ source venv/bin/activate
587
+ cd moonshot-ui
588
+ npm install
589
+ npm run build
590
+ cd ../
591
+ nohup python -m moonshot web &
592
+
593
+ - name: Checkout Integration Test
594
+ uses: actions/checkout@v4
595
+ with:
596
+ repository: aiverify-foundation/moonshot-integration-testing
597
+ path: moonshot-integration-testing
598
+
599
+ - name: Run Integration UI Test
600
+ env:
601
+ URI: ${{ secrets.URI }}
602
+ TOKEN: ${{ secrets.TOKEN }}
603
+ URI2: ${{ secrets.URI2 }}
604
+ TOKEN2: ${{ secrets.TOKEN2 }}
605
+ ADDITIONAL_PARAMETERS: ${{ secrets.ADDITIONAL_PARAMETERS }}
606
+ TOGETHER_TOKEN: ${{ secrets.TOGETHER_TOKEN }}
607
+ OPENAI_TOKEN: ${{ secrets.OPENAI_TOKEN }}
608
+ AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
609
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
610
+ GOOGLE_TOKEN: ${{ secrets.GOOGLE_TOKEN }}
611
+ H2OGPT_TOKEN: ${{ secrets.H2OGPT_TOKEN }}
612
+ id: integrationuitest
613
+ run: |
614
+ source venv/bin/activate
615
+ cd moonshot-integration-testing/ui-integration-testing
616
+ npm ci
617
+ npx playwright install
618
+ npx playwright install-deps
619
+ npm install dotenv --save
620
+ # echo "Running Red Teaming UI Test Cases"
621
+ URI="$URI" TOKEN="$TOKEN" URI2="$URI2" TOKEN2="$TOKEN2" ADDITIONAL_PARAMETERS="$ADDITIONAL_PARAMETERS" TOGETHER_TOKEN="$TOGETHER_TOKEN" OPENAI_TOKEN="$OPENAI_TOKEN" AWS_ACCESS_KEY_ID="$AWS_ACCESS_KEY_ID" AWS_SECRET_ACCESS_KEY="$AWS_SECRET_ACCESS_KEY" GOOGLE_TOKEN="$GOOGLE_TOKEN" H2OGPT_TOKEN="$H2OGPT_TOKEN" DEBUG=pw:api npx playwright test tests/red_teaming.spec.ts
622
+
623
+ - name: Print Environment Variables
624
+ run: env
625
+
626
+ - name: Upload Playwright Traces
627
+ if: always()
628
+ uses: actions/upload-artifact@v4
629
+ with:
630
+ name: playwright-trace-integration-ui-test-redteaming-${{ github.run_id }}
631
+ path: |
632
+ /home/runner/work/moonshot/moonshot/moonshot-integration-testing/ui-integration-testing/test-results
633
+
634
+ - name: TestRail upload results
635
+ env:
636
+ TESTRAIL_USERNAME: ${{ secrets.TESTRAIL_USERNAME }}
637
+ TESTRAIL_PASSWORD: ${{ secrets.TESTRAIL_PASSWORD }}
638
+ run: |
639
+ cd moonshot-integration-testing/ui-integration-testing
640
+ pip install trcli
641
+ trcli -y \
642
+ -h https://imdabtg.testrail.io/ \
643
+ --project "Moonshot" \
644
+ -u $TESTRAIL_USERNAME \
645
+ -p $TESTRAIL_PASSWORD \
646
+ parse_junit \
647
+ --title "Moonshot" \
648
+ --result-fields "os:Ubuntu 22.04" \
649
+ --milestone-id "5" \
650
+ --run-description ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \
651
+ -f "./test-results/junit-report.xml"
652
+ ##########################################################################################################################################################################
653
+ integration-ui-test-utils:
654
+
655
+ runs-on: ubuntu-latest
656
+ timeout-minutes: 300
657
+
658
+ steps:
659
+
660
+ - name: Checkout Moonshot (Pull Request Review)
661
+ if: github.event_name == 'pull_request_review'
662
+ uses: actions/checkout@v4
663
+ with:
664
+ repository: ${{ github.event.pull_request.head.repo.full_name }}
665
+ ref: ${{ github.event.pull_request.head.ref }}
666
+
667
+ - name: Checkout Moonshot (Workflow Dispatch)
668
+ if: github.event_name == 'workflow_dispatch'
669
+ uses: actions/checkout@v4
670
+ with:
671
+ repository: aiverify-foundation/moonshot
672
+ ref: ${{ inputs.moonshot_branch }}
673
+
674
+ - name: Setup Python 3.11
675
+ uses: actions/setup-python@v4
676
+ with:
677
+ python-version: '3.11'
678
+
679
+ - name: Setup Moonshot
680
+ run: |
681
+ python -m venv venv
682
+ source venv/bin/activate
683
+ pip install -r requirements.txt
684
+ touch .env
685
+ echo "${{ secrets.ENVIRONMENT_VARS }}" >> .env
686
+
687
+ - name: Checkout Moonshot Data (Pull Request Review)
688
+ if: github.event_name == 'pull_request_review'
689
+ uses: actions/checkout@v4
690
+ with:
691
+ repository: aiverify-foundation/moonshot-data
692
+ ref: ${{ vars.MOONSHOT_DATA_BRANCH }}
693
+ path: moonshot-data
694
+
695
+ - name: Checkout Moonshot Data (Workflow Dispatch)
696
+ if: github.event_name == 'workflow_dispatch'
697
+ uses: actions/checkout@v4
698
+ with:
699
+ repository: aiverify-foundation/moonshot-data
700
+ ref: ${{ inputs.moonshot_data_branch }}
701
+ path: moonshot-data
702
+
703
+ - name: Setup Moonshot Data
704
+ run: |
705
+ source venv/bin/activate
706
+ cd moonshot-data
707
+ pip install -r requirements.txt
708
+
709
+ - name: Checkout Moonshot UI (Pull Request Review)
710
+ if: github.event_name == 'pull_request_review'
711
+ uses: actions/checkout@v4
712
+ with:
713
+ repository: aiverify-foundation/moonshot-ui
714
+ ref: ${{ vars.MOONSHOT_UI_BRANCH }}
715
+ path: moonshot-ui
716
+
717
+ - name: Checkout Moonshot UI (Workflow Dispatch)
718
+ if: github.event_name == 'workflow_dispatch'
719
+ uses: actions/checkout@v4
720
+ with:
721
+ repository: aiverify-foundation/moonshot-ui
722
+ ref: ${{ inputs.moonshot_ui_branch }}
723
+ path: moonshot-ui
724
+
725
+ # Download NLTK stopwords
726
+ - name: Download NLTK stopwords
727
+ run: |
728
+ source venv/bin/activate
729
+ pip install nltk
730
+ python -c "import nltk; nltk.download('stopwords');nltk.download('punkt');nltk.download('punkt_tab');nltk.download('averaged_perceptron_tagger_eng')"
731
+
732
+ - name: Setup Moonshot UI
733
+ run: |
734
+ source venv/bin/activate
735
+ cd moonshot-ui
736
+ npm install
737
+ npm run build
738
+ cd ../
739
+ nohup python -m moonshot web &
740
+
741
+ - name: Checkout Integration Test
742
+ uses: actions/checkout@v4
743
+ with:
744
+ repository: aiverify-foundation/moonshot-integration-testing
745
+ path: moonshot-integration-testing
746
+
747
+ - name: Run Integration UI Test
748
+ env:
749
+ URI: ${{ secrets.URI }}
750
+ TOKEN: ${{ secrets.TOKEN }}
751
+ URI2: ${{ secrets.URI2 }}
752
+ TOKEN2: ${{ secrets.TOKEN2 }}
753
+ ADDITIONAL_PARAMETERS: ${{ secrets.ADDITIONAL_PARAMETERS }}
754
+ TOGETHER_TOKEN: ${{ secrets.TOGETHER_TOKEN }}
755
+ OPENAI_TOKEN: ${{ secrets.OPENAI_TOKEN }}
756
+ AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
757
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
758
+ GOOGLE_TOKEN: ${{ secrets.GOOGLE_TOKEN }}
759
+ H2OGPT_TOKEN: ${{ secrets.H2OGPT_TOKEN }}
760
+ id: integrationuitest
761
+ run: |
762
+ source venv/bin/activate
763
+ cd moonshot-integration-testing/ui-integration-testing
764
+ npm ci
765
+ npx playwright install
766
+ npx playwright install-deps
767
+ npm install dotenv --save
768
+ # echo "Running Homepage Test Cases"
769
+ URI="$URI" TOKEN="$TOKEN" URI2="$URI2" TOKEN2="$TOKEN2" ADDITIONAL_PARAMETERS="$ADDITIONAL_PARAMETERS" TOGETHER_TOKEN="$TOGETHER_TOKEN" OPENAI_TOKEN="$OPENAI_TOKEN" AWS_ACCESS_KEY_ID="$AWS_ACCESS_KEY_ID" AWS_SECRET_ACCESS_KEY="$AWS_SECRET_ACCESS_KEY" GOOGLE_TOKEN="$GOOGLE_TOKEN" H2OGPT_TOKEN="$H2OGPT_TOKEN" DEBUG=pw:api npx playwright test tests/utils.spec.ts
770
+
771
+ - name: Print Environment Variables
772
+ run: env
773
+
774
+ - name: Upload Playwright Traces
775
+ if: always()
776
+ uses: actions/upload-artifact@v4
777
+ with:
778
+ name: playwright-trace-integration-ui-test-utils-${{ github.run_id }}
779
+ path: |
780
+ /home/runner/work/moonshot/moonshot/moonshot-integration-testing/ui-integration-testing/test-results
781
+
782
+ - name: TestRail upload results
783
+ env:
784
+ TESTRAIL_USERNAME: ${{ secrets.TESTRAIL_USERNAME }}
785
+ TESTRAIL_PASSWORD: ${{ secrets.TESTRAIL_PASSWORD }}
786
+ run: |
787
+ cd moonshot-integration-testing/ui-integration-testing
788
+ pip install trcli
789
+ trcli -y \
790
+ -h https://imdabtg.testrail.io/ \
791
+ --project "Moonshot" \
792
+ -u $TESTRAIL_USERNAME \
793
+ -p $TESTRAIL_PASSWORD \
794
+ parse_junit \
795
+ --title "Moonshot" \
796
+ --result-fields "os:Ubuntu 22.04" \
797
+ --milestone-id "5" \
798
+ --run-description ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \
799
+ -f "./test-results/junit-report.xml"
800
+ ##########################################################################################################################################################################
801
+ integration-ui-test-history:
802
+
803
+ runs-on: ubuntu-latest
804
+ timeout-minutes: 300
805
+
806
+ steps:
807
+
808
+ - name: Checkout Moonshot (Pull Request Review)
809
+ if: github.event_name == 'pull_request_review'
810
+ uses: actions/checkout@v4
811
+ with:
812
+ repository: ${{ github.event.pull_request.head.repo.full_name }}
813
+ ref: ${{ github.event.pull_request.head.ref }}
814
+
815
+ - name: Checkout Moonshot (Workflow Dispatch)
816
+ if: github.event_name == 'workflow_dispatch'
817
+ uses: actions/checkout@v4
818
+ with:
819
+ repository: aiverify-foundation/moonshot
820
+ ref: ${{ inputs.moonshot_branch }}
821
+
822
+ - name: Setup Python 3.11
823
+ uses: actions/setup-python@v4
824
+ with:
825
+ python-version: '3.11'
826
+
827
+ - name: Setup Moonshot
828
+ run: |
829
+ python -m venv venv
830
+ source venv/bin/activate
831
+ pip install -r requirements.txt
832
+ touch .env
833
+ echo "${{ secrets.ENVIRONMENT_VARS }}" >> .env
834
+
835
+ - name: Checkout Moonshot Data (Pull Request Review)
836
+ if: github.event_name == 'pull_request_review'
837
+ uses: actions/checkout@v4
838
+ with:
839
+ repository: aiverify-foundation/moonshot-data
840
+ ref: ${{ vars.MOONSHOT_DATA_BRANCH }}
841
+ path: moonshot-data
842
+
843
+ - name: Checkout Moonshot Data (Workflow Dispatch)
844
+ if: github.event_name == 'workflow_dispatch'
845
+ uses: actions/checkout@v4
846
+ with:
847
+ repository: aiverify-foundation/moonshot-data
848
+ ref: ${{ inputs.moonshot_data_branch }}
849
+ path: moonshot-data
850
+
851
+ - name: Setup Moonshot Data
852
+ run: |
853
+ source venv/bin/activate
854
+ cd moonshot-data
855
+ pip install -r requirements.txt
856
+
857
+ - name: Checkout Moonshot UI (Pull Request Review)
858
+ if: github.event_name == 'pull_request_review'
859
+ uses: actions/checkout@v4
860
+ with:
861
+ repository: aiverify-foundation/moonshot-ui
862
+ ref: ${{ vars.MOONSHOT_UI_BRANCH }}
863
+ path: moonshot-ui
864
+
865
+ - name: Checkout Moonshot UI (Workflow Dispatch)
866
+ if: github.event_name == 'workflow_dispatch'
867
+ uses: actions/checkout@v4
868
+ with:
869
+ repository: aiverify-foundation/moonshot-ui
870
+ ref: ${{ inputs.moonshot_ui_branch }}
871
+ path: moonshot-ui
872
+
873
+ # Download NLTK stopwords
874
+ - name: Download NLTK stopwords
875
+ run: |
876
+ source venv/bin/activate
877
+ pip install nltk
878
+ python -c "import nltk; nltk.download('stopwords');nltk.download('punkt');nltk.download('punkt_tab');nltk.download('averaged_perceptron_tagger_eng')"
879
+
880
+ - name: Setup Moonshot UI
881
+ run: |
882
+ source venv/bin/activate
883
+ cd moonshot-ui
884
+ npm install
885
+ npm run build
886
+ cd ../
887
+ nohup python -m moonshot web &
888
+
889
+ - name: Checkout Integration Test
890
+ uses: actions/checkout@v4
891
+ with:
892
+ repository: aiverify-foundation/moonshot-integration-testing
893
+ path: moonshot-integration-testing
894
+
895
+ - name: Run Integration UI Test
896
+ env:
897
+ URI: ${{ secrets.URI }}
898
+ TOKEN: ${{ secrets.TOKEN }}
899
+ URI2: ${{ secrets.URI2 }}
900
+ TOKEN2: ${{ secrets.TOKEN2 }}
901
+ ADDITIONAL_PARAMETERS: ${{ secrets.ADDITIONAL_PARAMETERS }}
902
+ TOGETHER_TOKEN: ${{ secrets.TOGETHER_TOKEN }}
903
+ OPENAI_TOKEN: ${{ secrets.OPENAI_TOKEN }}
904
+ AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
905
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
906
+ GOOGLE_TOKEN: ${{ secrets.GOOGLE_TOKEN }}
907
+ H2OGPT_TOKEN: ${{ secrets.H2OGPT_TOKEN }}
908
+ id: integrationuitest
909
+ run: |
910
+ source venv/bin/activate
911
+ cd moonshot-integration-testing/ui-integration-testing
912
+ npm ci
913
+ npx playwright install
914
+ npx playwright install-deps
915
+ npm install dotenv --save
916
+ # echo "Running Homepage Test Cases"
917
+ URI="$URI" TOKEN="$TOKEN" URI2="$URI2" TOKEN2="$TOKEN2" ADDITIONAL_PARAMETERS="$ADDITIONAL_PARAMETERS" TOGETHER_TOKEN="$TOGETHER_TOKEN" OPENAI_TOKEN="$OPENAI_TOKEN" AWS_ACCESS_KEY_ID="$AWS_ACCESS_KEY_ID" AWS_SECRET_ACCESS_KEY="$AWS_SECRET_ACCESS_KEY" GOOGLE_TOKEN="$GOOGLE_TOKEN" H2OGPT_TOKEN="$H2OGPT_TOKEN" DEBUG=pw:api npx playwright test tests/history.spec.ts
918
+
919
+ - name: Print Environment Variables
920
+ run: env
921
+
922
+ - name: Upload Playwright Traces
923
+ if: always()
924
+ uses: actions/upload-artifact@v4
925
+ with:
926
+ name: playwright-trace-integration-ui-test-history-${{ github.run_id }}
927
+ path: |
928
+ /home/runner/work/moonshot/moonshot/moonshot-integration-testing/ui-integration-testing/test-results
929
+
930
+ - name: TestRail upload results
931
+ env:
932
+ TESTRAIL_USERNAME: ${{ secrets.TESTRAIL_USERNAME }}
933
+ TESTRAIL_PASSWORD: ${{ secrets.TESTRAIL_PASSWORD }}
934
+ run: |
935
+ cd moonshot-integration-testing/ui-integration-testing
936
+ pip install trcli
937
+ trcli -y \
938
+ -h https://imdabtg.testrail.io/ \
939
+ --project "Moonshot" \
940
+ -u $TESTRAIL_USERNAME \
941
+ -p $TESTRAIL_PASSWORD \
942
+ parse_junit \
943
+ --title "Moonshot" \
944
+ --result-fields "os:Ubuntu 22.04" \
945
+ --milestone-id "5" \
946
+ --run-description ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \
947
+ -f "./test-results/junit-report.xml"
948
+ ##########################################################################################################################################################################
949
+ integration-cli-test:
950
+
951
+ runs-on: ubuntu-latest
952
+ timeout-minutes: 300
953
+ steps:
954
+
955
+ - name: Checkout Moonshot (Pull Request Review)
956
+ if: github.event_name == 'pull_request_review'
957
+ uses: actions/checkout@v4
958
+ with:
959
+ repository: ${{ github.event.pull_request.head.repo.full_name }}
960
+ ref: ${{ github.event.pull_request.head.ref }}
961
+
962
+ - name: Checkout Moonshot (Workflow Dispatch)
963
+ if: github.event_name == 'workflow_dispatch'
964
+ uses: actions/checkout@v4
965
+ with:
966
+ repository: aiverify-foundation/moonshot
967
+ ref: ${{ inputs.moonshot_branch }}
968
+
969
+ - name: Setup Python 3.11
970
+ uses: actions/setup-python@v4
971
+ with:
972
+ python-version: '3.11'
973
+
974
+ - name: Setup Moonshot
975
+ run: |
976
+ python -m venv venv
977
+ source venv/bin/activate
978
+ pip install -r requirements.txt
979
+ touch .env
980
+ echo "${{ secrets.ENVIRONMENT_VARS }}" >> .env
981
+
982
+ - name: Checkout Moonshot Data (Pull Request Review)
983
+ if: github.event_name == 'pull_request_review'
984
+ uses: actions/checkout@v4
985
+ with:
986
+ repository: aiverify-foundation/moonshot-data
987
+ ref: ${{ vars.MOONSHOT_DATA_BRANCH }}
988
+ path: moonshot-data
989
+
990
+ - name: Checkout Moonshot Data (Workflow Dispatch)
991
+ if: github.event_name == 'workflow_dispatch'
992
+ uses: actions/checkout@v4
993
+ with:
994
+ repository: aiverify-foundation/moonshot-data
995
+ ref: ${{ inputs.moonshot_data_branch }}
996
+ path: moonshot-data
997
+
998
+ - name: Setup Moonshot Data
999
+ run: |
1000
+ source venv/bin/activate
1001
+ cd moonshot-data
1002
+ pip install -r requirements.txt
1003
+
1004
+ - name: Checkout Moonshot UI (Pull Request Review)
1005
+ if: github.event_name == 'pull_request_review'
1006
+ uses: actions/checkout@v4
1007
+ with:
1008
+ repository: aiverify-foundation/moonshot-ui
1009
+ ref: ${{ vars.MOONSHOT_UI_BRANCH }}
1010
+ path: moonshot-ui
1011
+
1012
+ - name: Checkout Moonshot UI (Workflow Dispatch)
1013
+ if: github.event_name == 'workflow_dispatch'
1014
+ uses: actions/checkout@v4
1015
+ with:
1016
+ repository: aiverify-foundation/moonshot-ui
1017
+ ref: ${{ inputs.moonshot_ui_branch }}
1018
+ path: moonshot-ui
1019
+
1020
+ # Download NLTK stopwords
1021
+ - name: Download NLTK stopwords
1022
+ run: |
1023
+ source venv/bin/activate
1024
+ pip install nltk
1025
+ python -c "import nltk; nltk.download('stopwords');nltk.download('punkt');nltk.download('punkt_tab');nltk.download('averaged_perceptron_tagger_eng')"
1026
+
1027
+ - name: Setup Moonshot UI
1028
+ run: |
1029
+ source venv/bin/activate
1030
+ cd moonshot-ui
1031
+ npm install
1032
+ npm run build
1033
+ cd ../
1034
+ nohup python -m moonshot web &
1035
+
1036
+ - name: Checkout Integration Test
1037
+ uses: actions/checkout@v4
1038
+ with:
1039
+ repository: aiverify-foundation/moonshot-integration-testing
1040
+ path: moonshot-integration-testing
1041
+
1042
+ - name: Print Environment Variables
1043
+ run: env
1044
+
1045
+ - name: Run Integration CLI Test
1046
+ env:
1047
+ AZURE_OPENAI_URI: ${{ secrets.AZURE_OPENAI_URI }}
1048
+ AZURE_OPENAI_TOKEN: ${{ secrets.AZURE_OPENAI_TOKEN }}
1049
+ ADDITIONAL_PARAMETERS: ${{ secrets.ADDITIONAL_PARAMETERS }}
1050
+ MOONSHOT_URL: ${{ secrets.MOONSHOT_URL }}
1051
+ MOONSHOT_PORT_NUMBER: ${{ secrets.MOONSHOT_PORT_NUMBER }}
1052
+ CLI_DIR: ${{ secrets.CLI_DIR }}
1053
+ ACTIONS_STEP_DEBUG: true
1054
+ ACTIONS_RUNNER_DEBUG: true
1055
+ run: |
1056
+ source venv/bin/activate
1057
+ cd moonshot-integration-testing/cli-integration-testing
1058
+ echo "Current Directory: $(pwd)"
1059
+ pip install python-dotenv
1060
+ pip install pytest
1061
+ pytest
1062
+
1063
+