aiverify-moonshot 0.6.1__tar.gz → 0.6.2__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 (210) hide show
  1. aiverify_moonshot-0.6.2/.github/workflows/integration-test.yaml +739 -0
  2. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/.github/workflows/pypi-deployment.yaml +1 -1
  3. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/.github/workflows/sca-scan.yaml +1 -1
  4. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/.github/workflows/smoke-test.yaml +15 -5
  5. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/PKG-INFO +3 -2
  6. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/README.md +1 -1
  7. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/__main__.py +9 -0
  8. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/app.py +1 -1
  9. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/routes/dataset.py +32 -4
  10. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/schemas/dataset_create_dto.py +3 -3
  11. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/services/dataset_service.py +4 -3
  12. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/api/api_dataset.py +52 -12
  13. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/datasets/dataset.py +19 -3
  14. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/pyproject.toml +4 -3
  15. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/requirements.txt +1 -0
  16. aiverify_moonshot-0.6.1/.github/workflows/integration-test.yaml +0 -205
  17. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/.coveragerc +0 -0
  18. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/.flake8 +0 -0
  19. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/.github/developing-workflows.md +0 -0
  20. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/.github/pull_request_template.md +0 -0
  21. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/.github/scripts/create_backup.sh +0 -0
  22. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/.github/scripts/install_ms_service.sh +0 -0
  23. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/.github/scripts/moonshot_env +0 -0
  24. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/.github/scripts/moonshot_test_env +0 -0
  25. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/.github/scripts/moonshot_ui_env +0 -0
  26. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/.github/scripts/run_smoke_test.sh +0 -0
  27. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/.github/scripts/start_ms_service.sh +0 -0
  28. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/.github/workflows/docs-update.yaml +0 -0
  29. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/.github/workflows/gh-event-notification.yaml +0 -0
  30. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/.github/workflows/notices-file-gen.yaml +0 -0
  31. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/.github/workflows/pre-build-checks.yaml +0 -0
  32. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/.github/workflows/sast-codeql.yaml +0 -0
  33. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/.github/workflows/sit-build.yaml +0 -0
  34. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/.github/workflows/smoke-test-cli.yaml +0 -0
  35. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/.github/workflows/test-pypi-deployment.yaml +0 -0
  36. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/.github/workflows/uat-build.yaml +0 -0
  37. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/.gitignore +0 -0
  38. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/.pre-commit-config.yaml +0 -0
  39. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/AUTHORS.md +0 -0
  40. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/LICENSE.md +0 -0
  41. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/NOTICES.md +0 -0
  42. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/__init__.py +0 -0
  43. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/api.py +0 -0
  44. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/__init__.py +0 -0
  45. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/cli/__init__.py +0 -0
  46. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/cli/__main__.py +0 -0
  47. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/cli/active_session_cfg.py +0 -0
  48. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/cli/benchmark/__init__.py +0 -0
  49. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/cli/benchmark/benchmark.py +0 -0
  50. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/cli/benchmark/cookbook.py +0 -0
  51. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/cli/benchmark/datasets.py +0 -0
  52. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/cli/benchmark/metrics.py +0 -0
  53. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/cli/benchmark/recipe.py +0 -0
  54. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/cli/benchmark/result.py +0 -0
  55. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/cli/benchmark/run.py +0 -0
  56. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/cli/benchmark/runner.py +0 -0
  57. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/cli/cli.py +0 -0
  58. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/cli/cli_errors.py +0 -0
  59. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/cli/common/__init__.py +0 -0
  60. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/cli/common/common.py +0 -0
  61. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/cli/common/connectors.py +0 -0
  62. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/cli/common/dataset.py +0 -0
  63. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/cli/common/display_helper.py +0 -0
  64. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/cli/common/prompt_template.py +0 -0
  65. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/cli/initialisation/__init__.py +0 -0
  66. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/cli/initialisation/initialisation.py +0 -0
  67. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/cli/redteam/__init__.py +0 -0
  68. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/cli/redteam/attack_module.py +0 -0
  69. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/cli/redteam/context_strategy.py +0 -0
  70. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/cli/redteam/prompt_template.py +0 -0
  71. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/cli/redteam/redteam.py +0 -0
  72. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/cli/redteam/session.py +0 -0
  73. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/cli/utils/process_data.py +0 -0
  74. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/.env.dev +0 -0
  75. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/__init__.py +0 -0
  76. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/__main__.py +0 -0
  77. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/container.py +0 -0
  78. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/log/.gitkeep +0 -0
  79. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/logging_conf.py +0 -0
  80. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/routes/__init__.py +0 -0
  81. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/routes/attack_modules.py +0 -0
  82. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/routes/benchmark.py +0 -0
  83. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/routes/benchmark_result.py +0 -0
  84. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/routes/bookmark.py +0 -0
  85. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/routes/context_strategy.py +0 -0
  86. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/routes/cookbook.py +0 -0
  87. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/routes/endpoint.py +0 -0
  88. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/routes/metric.py +0 -0
  89. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/routes/prompt_template.py +0 -0
  90. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/routes/recipe.py +0 -0
  91. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/routes/redteam.py +0 -0
  92. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/routes/runner.py +0 -0
  93. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/schemas/__init__.py +0 -0
  94. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/schemas/benchmark_runner_dto.py +0 -0
  95. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/schemas/bookmark_create_dto.py +0 -0
  96. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/schemas/cookbook_create_dto.py +0 -0
  97. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/schemas/cookbook_response_model.py +0 -0
  98. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/schemas/dataset_response_dto.py +0 -0
  99. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/schemas/endpoint_create_dto.py +0 -0
  100. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/schemas/endpoint_response_model.py +0 -0
  101. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/schemas/prompt_response_model.py +0 -0
  102. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/schemas/prompt_template_response_model.py +0 -0
  103. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/schemas/recipe_create_dto.py +0 -0
  104. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/schemas/recipe_response_model.py +0 -0
  105. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/schemas/session_create_dto.py +0 -0
  106. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/schemas/session_prompt_dto.py +0 -0
  107. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/schemas/session_response_model.py +0 -0
  108. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/services/__init__.py +0 -0
  109. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/services/attack_module_service.py +0 -0
  110. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/services/auto_red_team_test_manager.py +0 -0
  111. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/services/auto_red_team_test_state.py +0 -0
  112. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/services/base_service.py +0 -0
  113. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/services/benchmark_result_service.py +0 -0
  114. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/services/benchmark_test_manager.py +0 -0
  115. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/services/benchmark_test_state.py +0 -0
  116. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/services/benchmarking_service.py +0 -0
  117. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/services/bookmark_service.py +0 -0
  118. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/services/context_strategy_service.py +0 -0
  119. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/services/cookbook_service.py +0 -0
  120. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/services/endpoint_service.py +0 -0
  121. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/services/metric_service.py +0 -0
  122. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/services/prompt_template_service.py +0 -0
  123. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/services/recipe_service.py +0 -0
  124. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/services/runner_service.py +0 -0
  125. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/services/session_service.py +0 -0
  126. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/services/utils/exceptions_handler.py +0 -0
  127. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/services/utils/file_manager.py +0 -0
  128. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/services/utils/results_formatter.py +0 -0
  129. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/status_updater/interface/benchmark_progress_callback.py +0 -0
  130. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/status_updater/interface/redteam_progress_callback.py +0 -0
  131. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/status_updater/moonshot_ui_webhook.py +0 -0
  132. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/temp/.gitkeep +0 -0
  133. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/integrations/web_api/types/types.py +0 -0
  134. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/__init__.py +0 -0
  135. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/api/__init__.py +0 -0
  136. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/api/api_bookmark.py +0 -0
  137. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/api/api_connector.py +0 -0
  138. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/api/api_connector_endpoint.py +0 -0
  139. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/api/api_context_strategy.py +0 -0
  140. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/api/api_cookbook.py +0 -0
  141. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/api/api_environment_variables.py +0 -0
  142. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/api/api_metrics.py +0 -0
  143. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/api/api_prompt_template.py +0 -0
  144. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/api/api_recipe.py +0 -0
  145. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/api/api_red_teaming.py +0 -0
  146. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/api/api_result.py +0 -0
  147. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/api/api_run.py +0 -0
  148. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/api/api_runner.py +0 -0
  149. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/api/api_session.py +0 -0
  150. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/bookmark/bookmark.py +0 -0
  151. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/bookmark/bookmark_arguments.py +0 -0
  152. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/configs/__init__.py +0 -0
  153. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/configs/env_variables.py +0 -0
  154. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/connectors/__init__.py +0 -0
  155. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/connectors/connector.py +0 -0
  156. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/connectors/connector_prompt_arguments.py +0 -0
  157. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/connectors/connector_response.py +0 -0
  158. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/connectors_endpoints/__init__.py +0 -0
  159. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/connectors_endpoints/connector_endpoint.py +0 -0
  160. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/connectors_endpoints/connector_endpoint_arguments.py +0 -0
  161. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/cookbooks/__init__.py +0 -0
  162. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/cookbooks/cookbook.py +0 -0
  163. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/cookbooks/cookbook_arguments.py +0 -0
  164. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/datasets/__init__.py +0 -0
  165. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/datasets/dataset_arguments.py +0 -0
  166. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/messages_constants.py +0 -0
  167. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/metrics/__init__.py +0 -0
  168. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/metrics/metric.py +0 -0
  169. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/metrics/metric_interface.py +0 -0
  170. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/prompt_templates/__init__.py +0 -0
  171. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/prompt_templates/prompt_template.py +0 -0
  172. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/recipes/__init__.py +0 -0
  173. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/recipes/recipe.py +0 -0
  174. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/recipes/recipe_arguments.py +0 -0
  175. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/redteaming/__init__.py +0 -0
  176. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/redteaming/attack/__init__.py +0 -0
  177. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/redteaming/attack/attack_module.py +0 -0
  178. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/redteaming/attack/attack_module_arguments.py +0 -0
  179. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/redteaming/attack/context_strategy.py +0 -0
  180. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/redteaming/context_strategy/__init__.py +0 -0
  181. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/redteaming/context_strategy/context_strategy_interface.py +0 -0
  182. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/redteaming/session/__init__.py +0 -0
  183. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/redteaming/session/chat.py +0 -0
  184. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/redteaming/session/red_teaming_progress.py +0 -0
  185. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/redteaming/session/red_teaming_type.py +0 -0
  186. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/redteaming/session/session.py +0 -0
  187. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/results/__init__.py +0 -0
  188. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/results/result.py +0 -0
  189. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/results/result_arguments.py +0 -0
  190. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/runners/__init__.py +0 -0
  191. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/runners/runner.py +0 -0
  192. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/runners/runner_arguments.py +0 -0
  193. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/runners/runner_type.py +0 -0
  194. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/runs/__init__.py +0 -0
  195. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/runs/run.py +0 -0
  196. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/runs/run_arguments.py +0 -0
  197. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/runs/run_progress.py +0 -0
  198. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/runs/run_status.py +0 -0
  199. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/storage/__init__.py +0 -0
  200. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/storage/db_interface.py +0 -0
  201. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/storage/io_interface.py +0 -0
  202. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/storage/storage.py +0 -0
  203. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/utils/__init__.py +0 -0
  204. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/utils/find_feature.py +0 -0
  205. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/utils/import_modules.py +0 -0
  206. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/utils/log.py +0 -0
  207. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/utils/pagination.py +0 -0
  208. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/moonshot/src/utils/timeit.py +0 -0
  209. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/third-party/pygments-2.18.0-py3-none-any.whl +0 -0
  210. {aiverify_moonshot-0.6.1 → aiverify_moonshot-0.6.2}/third-party/text_unidecode-1.3-py2.py3-none-any.whl +0 -0
@@ -0,0 +1,739 @@
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
+ id: integrationuitest
143
+ run: |
144
+ source venv/bin/activate
145
+ cd moonshot-integration-testing/ui-integration-testing
146
+ npm ci
147
+ npx playwright install
148
+ npx playwright install-deps
149
+ npm install dotenv --save
150
+ # echo "Running UI Endpoint Test Cases"
151
+ 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" DEBUG=pw:api npx playwright test tests/endpoint.spec.ts
152
+
153
+ - name: Print Environment Variables
154
+ run: env
155
+
156
+ - name: Upload Playwright Traces
157
+ if: always()
158
+ uses: actions/upload-artifact@v4
159
+ with:
160
+ name: playwright-trace-integration-ui-test-endpoint-${{ github.run_id }}
161
+ path: |
162
+ /home/runner/work/moonshot/moonshot/moonshot-integration-testing/ui-integration-testing/test-results
163
+
164
+ - name: TestRail upload results
165
+ env:
166
+ TESTRAIL_USERNAME: ${{ secrets.TESTRAIL_USERNAME }}
167
+ TESTRAIL_PASSWORD: ${{ secrets.TESTRAIL_PASSWORD }}
168
+ run: |
169
+ cd moonshot-integration-testing/ui-integration-testing
170
+ pip install trcli
171
+ trcli -y \
172
+ -h https://imdabtg.testrail.io/ \
173
+ --project "Moonshot" \
174
+ -u $TESTRAIL_USERNAME \
175
+ -p $TESTRAIL_PASSWORD \
176
+ parse_junit \
177
+ --title "Moonshot" \
178
+ --result-fields "os:Ubuntu 22.04" \
179
+ --milestone-id "5" \
180
+ --run-description ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \
181
+ -f "./test-results/junit-report.xml"
182
+ ##########################################################################################################################################################################
183
+ integration-ui-test-homepage:
184
+
185
+ runs-on: ubuntu-latest
186
+ timeout-minutes: 300
187
+
188
+ steps:
189
+
190
+ - name: Checkout Moonshot (Pull Request Review)
191
+ if: github.event_name == 'pull_request_review'
192
+ uses: actions/checkout@v4
193
+ with:
194
+ repository: ${{ github.event.pull_request.head.repo.full_name }}
195
+ ref: ${{ github.event.pull_request.head.ref }}
196
+
197
+ - name: Checkout Moonshot (Workflow Dispatch)
198
+ if: github.event_name == 'workflow_dispatch'
199
+ uses: actions/checkout@v4
200
+ with:
201
+ repository: aiverify-foundation/moonshot
202
+ ref: ${{ inputs.moonshot_branch }}
203
+
204
+ - name: Setup Python 3.11
205
+ uses: actions/setup-python@v4
206
+ with:
207
+ python-version: '3.11'
208
+
209
+ - name: Setup Moonshot
210
+ run: |
211
+ python -m venv venv
212
+ source venv/bin/activate
213
+ pip install -r requirements.txt
214
+ touch .env
215
+ echo "${{ secrets.ENVIRONMENT_VARS }}" >> .env
216
+
217
+ - name: Checkout Moonshot Data (Pull Request Review)
218
+ if: github.event_name == 'pull_request_review'
219
+ uses: actions/checkout@v4
220
+ with:
221
+ repository: aiverify-foundation/moonshot-data
222
+ ref: ${{ vars.MOONSHOT_DATA_BRANCH }}
223
+ path: moonshot-data
224
+
225
+ - name: Checkout Moonshot Data (Workflow Dispatch)
226
+ if: github.event_name == 'workflow_dispatch'
227
+ uses: actions/checkout@v4
228
+ with:
229
+ repository: aiverify-foundation/moonshot-data
230
+ ref: ${{ inputs.moonshot_data_branch }}
231
+ path: moonshot-data
232
+
233
+ - name: Setup Moonshot Data
234
+ run: |
235
+ source venv/bin/activate
236
+ cd moonshot-data
237
+ pip install -r requirements.txt
238
+
239
+ - name: Checkout Moonshot UI (Pull Request Review)
240
+ if: github.event_name == 'pull_request_review'
241
+ uses: actions/checkout@v4
242
+ with:
243
+ repository: aiverify-foundation/moonshot-ui
244
+ ref: ${{ vars.MOONSHOT_UI_BRANCH }}
245
+ path: moonshot-ui
246
+
247
+ - name: Checkout Moonshot UI (Workflow Dispatch)
248
+ if: github.event_name == 'workflow_dispatch'
249
+ uses: actions/checkout@v4
250
+ with:
251
+ repository: aiverify-foundation/moonshot-ui
252
+ ref: ${{ inputs.moonshot_ui_branch }}
253
+ path: moonshot-ui
254
+
255
+ # Download NLTK stopwords
256
+ - name: Download NLTK stopwords
257
+ run: |
258
+ source venv/bin/activate
259
+ pip install nltk
260
+ python -c "import nltk; nltk.download('stopwords');nltk.download('punkt');nltk.download('punkt_tab');nltk.download('averaged_perceptron_tagger_eng')"
261
+
262
+ - name: Setup Moonshot UI
263
+ run: |
264
+ source venv/bin/activate
265
+ cd moonshot-ui
266
+ npm install
267
+ npm run build
268
+ cd ../
269
+ nohup python -m moonshot web &
270
+
271
+ - name: Checkout Integration Test
272
+ uses: actions/checkout@v4
273
+ with:
274
+ repository: aiverify-foundation/moonshot-integration-testing
275
+ path: moonshot-integration-testing
276
+
277
+ - name: Run Integration UI Test
278
+ env:
279
+ URI: ${{ secrets.URI }}
280
+ TOKEN: ${{ secrets.TOKEN }}
281
+ URI2: ${{ secrets.URI2 }}
282
+ TOKEN2: ${{ secrets.TOKEN2 }}
283
+ ADDITIONAL_PARAMETERS: ${{ secrets.ADDITIONAL_PARAMETERS }}
284
+ TOGETHER_TOKEN: ${{ secrets.TOGETHER_TOKEN }}
285
+ OPENAI_TOKEN: ${{ secrets.OPENAI_TOKEN }}
286
+ AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
287
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
288
+ GOOGLE_TOKEN: ${{ secrets.GOOGLE_TOKEN }}
289
+ id: integrationuitest
290
+ run: |
291
+ source venv/bin/activate
292
+ cd moonshot-integration-testing/ui-integration-testing
293
+ npm ci
294
+ npx playwright install
295
+ npx playwright install-deps
296
+ npm install dotenv --save
297
+ # echo "Running Homepage Test Cases"
298
+ 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" DEBUG=pw:api npx playwright test tests/homepage.spec.ts
299
+
300
+ - name: Print Environment Variables
301
+ run: env
302
+
303
+ - name: Upload Playwright Traces
304
+ if: always()
305
+ uses: actions/upload-artifact@v4
306
+ with:
307
+ name: playwright-trace-integration-ui-test-homepage-${{ github.run_id }}
308
+ path: |
309
+ /home/runner/work/moonshot/moonshot/moonshot-integration-testing/ui-integration-testing/test-results
310
+
311
+ - name: TestRail upload results
312
+ env:
313
+ TESTRAIL_USERNAME: ${{ secrets.TESTRAIL_USERNAME }}
314
+ TESTRAIL_PASSWORD: ${{ secrets.TESTRAIL_PASSWORD }}
315
+ run: |
316
+ cd moonshot-integration-testing/ui-integration-testing
317
+ pip install trcli
318
+ trcli -y \
319
+ -h https://imdabtg.testrail.io/ \
320
+ --project "Moonshot" \
321
+ -u $TESTRAIL_USERNAME \
322
+ -p $TESTRAIL_PASSWORD \
323
+ parse_junit \
324
+ --title "Moonshot" \
325
+ --result-fields "os:Ubuntu 22.04" \
326
+ --milestone-id "5" \
327
+ --run-description ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \
328
+ -f "./test-results/junit-report.xml"
329
+ ##########################################################################################################################################################################
330
+ integration-ui-test-benchmarking:
331
+
332
+ runs-on: ubuntu-latest
333
+ timeout-minutes: 300
334
+
335
+ steps:
336
+
337
+ - name: Checkout Moonshot (Pull Request Review)
338
+ if: github.event_name == 'pull_request_review'
339
+ uses: actions/checkout@v4
340
+ with:
341
+ repository: ${{ github.event.pull_request.head.repo.full_name }}
342
+ ref: ${{ github.event.pull_request.head.ref }}
343
+
344
+ - name: Checkout Moonshot (Workflow Dispatch)
345
+ if: github.event_name == 'workflow_dispatch'
346
+ uses: actions/checkout@v4
347
+ with:
348
+ repository: aiverify-foundation/moonshot
349
+ ref: ${{ inputs.moonshot_branch }}
350
+
351
+ - name: Setup Python 3.11
352
+ uses: actions/setup-python@v4
353
+ with:
354
+ python-version: '3.11'
355
+
356
+ - name: Setup Moonshot
357
+ run: |
358
+ python -m venv venv
359
+ source venv/bin/activate
360
+ pip install -r requirements.txt
361
+ touch .env
362
+ echo "${{ secrets.ENVIRONMENT_VARS }}" >> .env
363
+
364
+ - name: Checkout Moonshot Data (Pull Request Review)
365
+ if: github.event_name == 'pull_request_review'
366
+ uses: actions/checkout@v4
367
+ with:
368
+ repository: aiverify-foundation/moonshot-data
369
+ ref: ${{ vars.MOONSHOT_DATA_BRANCH }}
370
+ path: moonshot-data
371
+
372
+ - name: Checkout Moonshot Data (Workflow Dispatch)
373
+ if: github.event_name == 'workflow_dispatch'
374
+ uses: actions/checkout@v4
375
+ with:
376
+ repository: aiverify-foundation/moonshot-data
377
+ ref: ${{ inputs.moonshot_data_branch }}
378
+ path: moonshot-data
379
+
380
+ - name: Setup Moonshot Data
381
+ run: |
382
+ source venv/bin/activate
383
+ cd moonshot-data
384
+ pip install -r requirements.txt
385
+
386
+ - name: Checkout Moonshot UI (Pull Request Review)
387
+ if: github.event_name == 'pull_request_review'
388
+ uses: actions/checkout@v4
389
+ with:
390
+ repository: aiverify-foundation/moonshot-ui
391
+ ref: ${{ vars.MOONSHOT_UI_BRANCH }}
392
+ path: moonshot-ui
393
+
394
+ - name: Checkout Moonshot UI (Workflow Dispatch)
395
+ if: github.event_name == 'workflow_dispatch'
396
+ uses: actions/checkout@v4
397
+ with:
398
+ repository: aiverify-foundation/moonshot-ui
399
+ ref: ${{ inputs.moonshot_ui_branch }}
400
+ path: moonshot-ui
401
+
402
+ # Download NLTK stopwords
403
+ - name: Download NLTK stopwords
404
+ run: |
405
+ source venv/bin/activate
406
+ pip install nltk
407
+ python -c "import nltk; nltk.download('stopwords');nltk.download('punkt');nltk.download('punkt_tab');nltk.download('averaged_perceptron_tagger_eng')"
408
+
409
+ - name: Setup Moonshot UI
410
+ run: |
411
+ source venv/bin/activate
412
+ cd moonshot-ui
413
+ npm install
414
+ npm run build
415
+ cd ../
416
+ nohup python -m moonshot web &
417
+
418
+ - name: Checkout Integration Test
419
+ uses: actions/checkout@v4
420
+ with:
421
+ repository: aiverify-foundation/moonshot-integration-testing
422
+ path: moonshot-integration-testing
423
+
424
+ - name: Run Integration UI Test
425
+ env:
426
+ URI: ${{ secrets.URI }}
427
+ TOKEN: ${{ secrets.TOKEN }}
428
+ URI2: ${{ secrets.URI2 }}
429
+ TOKEN2: ${{ secrets.TOKEN2 }}
430
+ ADDITIONAL_PARAMETERS: ${{ secrets.ADDITIONAL_PARAMETERS }}
431
+ TOGETHER_TOKEN: ${{ secrets.TOGETHER_TOKEN }}
432
+ OPENAI_TOKEN: ${{ secrets.OPENAI_TOKEN }}
433
+ AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
434
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
435
+ GOOGLE_TOKEN: ${{ secrets.GOOGLE_TOKEN }}
436
+ id: integrationuitest
437
+ run: |
438
+ source venv/bin/activate
439
+ cd moonshot-integration-testing/ui-integration-testing
440
+ npm ci
441
+ npx playwright install
442
+ npx playwright install-deps
443
+ npm install dotenv --save
444
+ echo "Running Benchmarking UI Test Cases"
445
+ 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" DEBUG=pw:api npx playwright test tests/benchmarking.spec.ts
446
+
447
+ - name: Print Environment Variables
448
+ run: env
449
+
450
+ - name: Upload Playwright Traces
451
+ if: always()
452
+ uses: actions/upload-artifact@v4
453
+ with:
454
+ name: playwright-trace-integration-ui-test-benchmarking-${{ github.run_id }}
455
+ path: |
456
+ /home/runner/work/moonshot/moonshot/moonshot-integration-testing/ui-integration-testing/test-results
457
+
458
+ - name: TestRail upload results
459
+ env:
460
+ TESTRAIL_USERNAME: ${{ secrets.TESTRAIL_USERNAME }}
461
+ TESTRAIL_PASSWORD: ${{ secrets.TESTRAIL_PASSWORD }}
462
+ run: |
463
+ cd moonshot-integration-testing/ui-integration-testing
464
+ pip install trcli
465
+ trcli -y \
466
+ -h https://imdabtg.testrail.io/ \
467
+ --project "Moonshot" \
468
+ -u $TESTRAIL_USERNAME \
469
+ -p $TESTRAIL_PASSWORD \
470
+ parse_junit \
471
+ --title "Moonshot" \
472
+ --result-fields "os:Ubuntu 22.04" \
473
+ --milestone-id "5" \
474
+ --run-description ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \
475
+ -f "./test-results/junit-report.xml"
476
+
477
+ ##########################################################################################################################################################################
478
+ integration-ui-test-red-teaming:
479
+
480
+ runs-on: ubuntu-latest
481
+ timeout-minutes: 300
482
+
483
+ steps:
484
+
485
+ - name: Checkout Moonshot (Pull Request Review)
486
+ if: github.event_name == 'pull_request_review'
487
+ uses: actions/checkout@v4
488
+ with:
489
+ repository: ${{ github.event.pull_request.head.repo.full_name }}
490
+ ref: ${{ github.event.pull_request.head.ref }}
491
+
492
+ - name: Checkout Moonshot (Workflow Dispatch)
493
+ if: github.event_name == 'workflow_dispatch'
494
+ uses: actions/checkout@v4
495
+ with:
496
+ repository: aiverify-foundation/moonshot
497
+ ref: ${{ inputs.moonshot_branch }}
498
+
499
+ - name: Setup Python 3.11
500
+ uses: actions/setup-python@v4
501
+ with:
502
+ python-version: '3.11'
503
+
504
+ - name: Setup Moonshot
505
+ run: |
506
+ python -m venv venv
507
+ source venv/bin/activate
508
+ pip install -r requirements.txt
509
+ touch .env
510
+ echo "${{ secrets.ENVIRONMENT_VARS }}" >> .env
511
+
512
+ - name: Checkout Moonshot Data (Pull Request Review)
513
+ if: github.event_name == 'pull_request_review'
514
+ uses: actions/checkout@v4
515
+ with:
516
+ repository: aiverify-foundation/moonshot-data
517
+ ref: ${{ vars.MOONSHOT_DATA_BRANCH }}
518
+ path: moonshot-data
519
+
520
+ - name: Checkout Moonshot Data (Workflow Dispatch)
521
+ if: github.event_name == 'workflow_dispatch'
522
+ uses: actions/checkout@v4
523
+ with:
524
+ repository: aiverify-foundation/moonshot-data
525
+ ref: ${{ inputs.moonshot_data_branch }}
526
+ path: moonshot-data
527
+
528
+ - name: Setup Moonshot Data
529
+ run: |
530
+ source venv/bin/activate
531
+ cd moonshot-data
532
+ pip install -r requirements.txt
533
+
534
+ - name: Checkout Moonshot UI (Pull Request Review)
535
+ if: github.event_name == 'pull_request_review'
536
+ uses: actions/checkout@v4
537
+ with:
538
+ repository: aiverify-foundation/moonshot-ui
539
+ ref: ${{ vars.MOONSHOT_UI_BRANCH }}
540
+ path: moonshot-ui
541
+
542
+ - name: Checkout Moonshot UI (Workflow Dispatch)
543
+ if: github.event_name == 'workflow_dispatch'
544
+ uses: actions/checkout@v4
545
+ with:
546
+ repository: aiverify-foundation/moonshot-ui
547
+ ref: ${{ inputs.moonshot_ui_branch }}
548
+ path: moonshot-ui
549
+
550
+ # Download NLTK stopwords
551
+ - name: Download NLTK stopwords
552
+ run: |
553
+ source venv/bin/activate
554
+ pip install nltk
555
+ python -c "import nltk; nltk.download('stopwords');nltk.download('punkt');nltk.download('punkt_tab');nltk.download('averaged_perceptron_tagger_eng')"
556
+
557
+ - name: Setup Moonshot UI
558
+ run: |
559
+ source venv/bin/activate
560
+ cd moonshot-ui
561
+ npm install
562
+ npm run build
563
+ cd ../
564
+ nohup python -m moonshot web &
565
+
566
+ - name: Checkout Integration Test
567
+ uses: actions/checkout@v4
568
+ with:
569
+ repository: aiverify-foundation/moonshot-integration-testing
570
+ path: moonshot-integration-testing
571
+
572
+ - name: Run Integration UI Test
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
+ id: integrationuitest
585
+ run: |
586
+ source venv/bin/activate
587
+ cd moonshot-integration-testing/ui-integration-testing
588
+ npm ci
589
+ npx playwright install
590
+ npx playwright install-deps
591
+ npm install dotenv --save
592
+ # echo "Running Red Teaming UI Test Cases"
593
+ 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" DEBUG=pw:api npx playwright test tests/red_teaming.spec.ts
594
+
595
+ - name: Print Environment Variables
596
+ run: env
597
+
598
+ - name: Upload Playwright Traces
599
+ if: always()
600
+ uses: actions/upload-artifact@v4
601
+ with:
602
+ name: playwright-trace-integration-ui-test-redteaming-${{ github.run_id }}
603
+ path: |
604
+ /home/runner/work/moonshot/moonshot/moonshot-integration-testing/ui-integration-testing/test-results
605
+
606
+ - name: TestRail upload results
607
+ env:
608
+ TESTRAIL_USERNAME: ${{ secrets.TESTRAIL_USERNAME }}
609
+ TESTRAIL_PASSWORD: ${{ secrets.TESTRAIL_PASSWORD }}
610
+ run: |
611
+ cd moonshot-integration-testing/ui-integration-testing
612
+ pip install trcli
613
+ trcli -y \
614
+ -h https://imdabtg.testrail.io/ \
615
+ --project "Moonshot" \
616
+ -u $TESTRAIL_USERNAME \
617
+ -p $TESTRAIL_PASSWORD \
618
+ parse_junit \
619
+ --title "Moonshot" \
620
+ --result-fields "os:Ubuntu 22.04" \
621
+ --milestone-id "5" \
622
+ --run-description ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \
623
+ -f "./test-results/junit-report.xml"
624
+ ##########################################################################################################################################################################
625
+ integration-cli-test:
626
+
627
+ runs-on: ubuntu-latest
628
+ timeout-minutes: 300
629
+ steps:
630
+
631
+ - name: Checkout Moonshot (Pull Request Review)
632
+ if: github.event_name == 'pull_request_review'
633
+ uses: actions/checkout@v4
634
+ with:
635
+ repository: ${{ github.event.pull_request.head.repo.full_name }}
636
+ ref: ${{ github.event.pull_request.head.ref }}
637
+
638
+ - name: Checkout Moonshot (Workflow Dispatch)
639
+ if: github.event_name == 'workflow_dispatch'
640
+ uses: actions/checkout@v4
641
+ with:
642
+ repository: aiverify-foundation/moonshot
643
+ ref: ${{ inputs.moonshot_branch }}
644
+
645
+ - name: Setup Python 3.11
646
+ uses: actions/setup-python@v4
647
+ with:
648
+ python-version: '3.11'
649
+
650
+ - name: Setup Moonshot
651
+ run: |
652
+ python -m venv venv
653
+ source venv/bin/activate
654
+ pip install -r requirements.txt
655
+ touch .env
656
+ echo "${{ secrets.ENVIRONMENT_VARS }}" >> .env
657
+
658
+ - name: Checkout Moonshot Data (Pull Request Review)
659
+ if: github.event_name == 'pull_request_review'
660
+ uses: actions/checkout@v4
661
+ with:
662
+ repository: aiverify-foundation/moonshot-data
663
+ ref: ${{ vars.MOONSHOT_DATA_BRANCH }}
664
+ path: moonshot-data
665
+
666
+ - name: Checkout Moonshot Data (Workflow Dispatch)
667
+ if: github.event_name == 'workflow_dispatch'
668
+ uses: actions/checkout@v4
669
+ with:
670
+ repository: aiverify-foundation/moonshot-data
671
+ ref: ${{ inputs.moonshot_data_branch }}
672
+ path: moonshot-data
673
+
674
+ - name: Setup Moonshot Data
675
+ run: |
676
+ source venv/bin/activate
677
+ cd moonshot-data
678
+ pip install -r requirements.txt
679
+
680
+ - name: Checkout Moonshot UI (Pull Request Review)
681
+ if: github.event_name == 'pull_request_review'
682
+ uses: actions/checkout@v4
683
+ with:
684
+ repository: aiverify-foundation/moonshot-ui
685
+ ref: ${{ vars.MOONSHOT_UI_BRANCH }}
686
+ path: moonshot-ui
687
+
688
+ - name: Checkout Moonshot UI (Workflow Dispatch)
689
+ if: github.event_name == 'workflow_dispatch'
690
+ uses: actions/checkout@v4
691
+ with:
692
+ repository: aiverify-foundation/moonshot-ui
693
+ ref: ${{ inputs.moonshot_ui_branch }}
694
+ path: moonshot-ui
695
+
696
+ # Download NLTK stopwords
697
+ - name: Download NLTK stopwords
698
+ run: |
699
+ source venv/bin/activate
700
+ pip install nltk
701
+ python -c "import nltk; nltk.download('stopwords');nltk.download('punkt');nltk.download('punkt_tab');nltk.download('averaged_perceptron_tagger_eng')"
702
+
703
+ - name: Setup Moonshot UI
704
+ run: |
705
+ source venv/bin/activate
706
+ cd moonshot-ui
707
+ npm install
708
+ npm run build
709
+ cd ../
710
+ nohup python -m moonshot web &
711
+
712
+ - name: Checkout Integration Test
713
+ uses: actions/checkout@v4
714
+ with:
715
+ repository: aiverify-foundation/moonshot-integration-testing
716
+ path: moonshot-integration-testing
717
+
718
+ - name: Print Environment Variables
719
+ run: env
720
+
721
+ - name: Run Integration CLI Test
722
+ env:
723
+ AZURE_OPENAI_URI: ${{ secrets.AZURE_OPENAI_URI }}
724
+ AZURE_OPENAI_TOKEN: ${{ secrets.AZURE_OPENAI_TOKEN }}
725
+ ADDITIONAL_PARAMETERS: ${{ secrets.ADDITIONAL_PARAMETERS }}
726
+ MOONSHOT_URL: ${{ secrets.MOONSHOT_URL }}
727
+ MOONSHOT_PORT_NUMBER: ${{ secrets.MOONSHOT_PORT_NUMBER }}
728
+ CLI_DIR: ${{ secrets.CLI_DIR }}
729
+ ACTIONS_STEP_DEBUG: true
730
+ ACTIONS_RUNNER_DEBUG: true
731
+ run: |
732
+ source venv/bin/activate
733
+ cd moonshot-integration-testing/cli-integration-testing
734
+ echo "Current Directory: $(pwd)"
735
+ pip install python-dotenv
736
+ pip install pytest
737
+ pytest
738
+
739
+