cucu 0.0.0__tar.gz → 1.0.0__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.

Potentially problematic release.


This version of cucu might be problematic. Click here for more details.

Files changed (261) hide show
  1. cucu-1.0.0/.circleci/config.yml +137 -0
  2. cucu-1.0.0/.env +1 -0
  3. cucu-1.0.0/.github/CODEOWNERS +2 -0
  4. cucu-1.0.0/.github/PULL_REQUEST_TEMPLATE.md +25 -0
  5. cucu-1.0.0/.github/workflows/build.yml +126 -0
  6. cucu-1.0.0/.github/workflows/create_a_new_release.yml +45 -0
  7. cucu-1.0.0/.github/workflows/publish-production.yml +31 -0
  8. cucu-1.0.0/.github/workflows/publish-test.yml +35 -0
  9. cucu-1.0.0/.gitignore +190 -0
  10. cucu-1.0.0/.pre-commit-config.yaml +21 -0
  11. cucu-1.0.0/.python-version +1 -0
  12. cucu-1.0.0/CHANGELOG.md +342 -0
  13. cucu-1.0.0/CODE_OF_CONDUCT.md +39 -0
  14. cucu-1.0.0/CONTRIBUTING.md +170 -0
  15. cucu-1.0.0/CONTRIBUTORS.md +19 -0
  16. cucu-1.0.0/LICENSE +32 -0
  17. cucu-1.0.0/Makefile +58 -0
  18. cucu-1.0.0/PKG-INFO +424 -0
  19. cucu-1.0.0/README.md +379 -0
  20. cucu-1.0.0/bin/cucu +2 -0
  21. cucu-1.0.0/bin/start_seleniarm_hub.sh +16 -0
  22. cucu-1.0.0/bin/start_selenium_hub.sh +17 -0
  23. cucu-1.0.0/cortex.yaml +18 -0
  24. cucu-1.0.0/data/features/custom_step_test/custom_step.feature +4 -0
  25. cucu-1.0.0/data/features/custom_step_test/steps/__init__.py +2 -0
  26. cucu-1.0.0/data/features/custom_step_test/steps/cucu_steps.py +6 -0
  27. cucu-1.0.0/data/features/echo.feature +20 -0
  28. cucu-1.0.0/data/features/environment.py +2 -0
  29. cucu-1.0.0/data/features/feature_skipping_scenarios_by_file_presence.feature +9 -0
  30. cucu-1.0.0/data/features/feature_with_background.feature +11 -0
  31. cucu-1.0.0/data/features/feature_with_background_using_substeps.feature +8 -0
  32. cucu-1.0.0/data/features/feature_with_failing_scenario.feature +5 -0
  33. cucu-1.0.0/data/features/feature_with_failing_scenario_with_table.feature +8 -0
  34. cucu-1.0.0/data/features/feature_with_failing_scenario_with_web.feature +7 -0
  35. cucu-1.0.0/data/features/feature_with_logging.feature +6 -0
  36. cucu-1.0.0/data/features/feature_with_long_names.feature +5 -0
  37. cucu-1.0.0/data/features/feature_with_mixed_results.feature +28 -0
  38. cucu-1.0.0/data/features/feature_with_multilines_and_tables.feature +18 -0
  39. cucu-1.0.0/data/features/feature_with_passing_scenario.feature +5 -0
  40. cucu-1.0.0/data/features/feature_with_passing_scenario_with_web.feature +6 -0
  41. cucu-1.0.0/data/features/feature_with_platform_specific_scenarios.feature +9 -0
  42. cucu-1.0.0/data/features/feature_with_scenario_outline.feature +9 -0
  43. cucu-1.0.0/data/features/feature_with_scenario_using_nth_type.feature +4 -0
  44. cucu-1.0.0/data/features/feature_with_tagging.feature +14 -0
  45. cucu-1.0.0/data/features/feature_with_xml_tags.feature +4 -0
  46. cucu-1.0.0/data/features/multiple_scenarios_with_browser_steps.feature +11 -0
  47. cucu-1.0.0/data/features/scenario_stop_retry_early.feature +6 -0
  48. cucu-1.0.0/data/features/scenario_that_fails_with_after_scenario_steps.feature +14 -0
  49. cucu-1.0.0/data/features/scenario_that_passes_with_after_scenario_steps.feature +13 -0
  50. cucu-1.0.0/data/features/scenario_with_console_logs.feature +10 -0
  51. cucu-1.0.0/data/features/scenario_with_substeps.feature +5 -0
  52. cucu-1.0.0/data/features/scenario_with_substeps_and_logging.feature +5 -0
  53. cucu-1.0.0/data/features/slow_features/slow_feature1.feature +4 -0
  54. cucu-1.0.0/data/features/slow_features/slow_feature2.feature +4 -0
  55. cucu-1.0.0/data/features/slow_features/slow_feature3.feature +4 -0
  56. cucu-1.0.0/data/features/slow_features/slow_feature4.feature +4 -0
  57. cucu-1.0.0/data/features/slow_features/slow_feature5.feature +4 -0
  58. cucu-1.0.0/data/features/steps/__init__.py +1 -0
  59. cucu-1.0.0/data/features/steps/cucu_steps.py +91 -0
  60. cucu-1.0.0/data/features/tagged_features/tagged_feature1.feature +6 -0
  61. cucu-1.0.0/data/features/tagged_features/tagged_feature2.feature +6 -0
  62. cucu-1.0.0/data/features/tagged_features/tagged_feature3.feature +6 -0
  63. cucu-1.0.0/data/features/with_secret/cucurc.yml +1 -0
  64. cucu-1.0.0/data/features/with_secret/scenario_with_comments.feature +28 -0
  65. cucu-1.0.0/data/unit/ansi.log +76 -0
  66. cucu-1.0.0/data/unit/ansi.log.html +88 -0
  67. cucu-1.0.0/data/www/broken_images.html +9 -0
  68. cucu-1.0.0/data/www/buttons.html +34 -0
  69. cucu-1.0.0/data/www/checkboxes.html +111 -0
  70. cucu-1.0.0/data/www/clipboard.html +39 -0
  71. cucu-1.0.0/data/www/comboboxes.html +533 -0
  72. cucu-1.0.0/data/www/console_logging.html +14 -0
  73. cucu-1.0.0/data/www/cookies.html +12 -0
  74. cucu-1.0.0/data/www/counter.html +18 -0
  75. cucu-1.0.0/data/www/draggables.html +53 -0
  76. cucu-1.0.0/data/www/dropdowns.html +27 -0
  77. cucu-1.0.0/data/www/duplicate_buttons.html +24 -0
  78. cucu-1.0.0/data/www/duplicate_inputs.html +23 -0
  79. cucu-1.0.0/data/www/dynamic_dropdown.html +46 -0
  80. cucu-1.0.0/data/www/file.txt +1 -0
  81. cucu-1.0.0/data/www/files.html +14 -0
  82. cucu-1.0.0/data/www/frames.html +22 -0
  83. cucu-1.0.0/data/www/fuzzy_rules.html +63 -0
  84. cucu-1.0.0/data/www/images.html +8 -0
  85. cucu-1.0.0/data/www/inputs.html +45 -0
  86. cucu-1.0.0/data/www/js/util.js +20 -0
  87. cucu-1.0.0/data/www/links.html +30 -0
  88. cucu-1.0.0/data/www/nothing_to_see_here.html +8 -0
  89. cucu-1.0.0/data/www/page_that_loads_forever.html +14 -0
  90. cucu-1.0.0/data/www/radio_buttons.html +33 -0
  91. cucu-1.0.0/data/www/stars.png +0 -0
  92. cucu-1.0.0/data/www/tables.html +151 -0
  93. cucu-1.0.0/data/www/tabs.html +312 -0
  94. cucu-1.0.0/data/www/text.html +23 -0
  95. cucu-1.0.0/features/browser/browser_tab_managemenet.feature +36 -0
  96. cucu-1.0.0/features/browser/browser_window_managemenet.feature +82 -0
  97. cucu-1.0.0/features/browser/buttons.feature +120 -0
  98. cucu-1.0.0/features/browser/checkboxes.feature +38 -0
  99. cucu-1.0.0/features/browser/clipboard.feature +26 -0
  100. cucu-1.0.0/features/browser/comboboxes.feature +22 -0
  101. cucu-1.0.0/features/browser/console_logs.feature +22 -0
  102. cucu-1.0.0/features/browser/cookies.feature +18 -0
  103. cucu-1.0.0/features/browser/draggables.feature +36 -0
  104. cucu-1.0.0/features/browser/dropdowns.feature +50 -0
  105. cucu-1.0.0/features/browser/duplicate_buttons.feature +38 -0
  106. cucu-1.0.0/features/browser/duplicate_draggables.feature +34 -0
  107. cucu-1.0.0/features/browser/duplicate_inputs.feature +16 -0
  108. cucu-1.0.0/features/browser/file_downloads.feature +22 -0
  109. cucu-1.0.0/features/browser/file_upload.feature +11 -0
  110. cucu-1.0.0/features/browser/frames.feature +38 -0
  111. cucu-1.0.0/features/browser/fuzzy_rules.feature +25 -0
  112. cucu-1.0.0/features/browser/helpers.feature +61 -0
  113. cucu-1.0.0/features/browser/images.feature +17 -0
  114. cucu-1.0.0/features/browser/inputs.feature +193 -0
  115. cucu-1.0.0/features/browser/inputs_limits.feature +32 -0
  116. cucu-1.0.0/features/browser/links.feature +29 -0
  117. cucu-1.0.0/features/browser/mht.feature +59 -0
  118. cucu-1.0.0/features/browser/page_checks.feature +102 -0
  119. cucu-1.0.0/features/browser/radio_buttons.feature +39 -0
  120. cucu-1.0.0/features/browser/tables.feature +186 -0
  121. cucu-1.0.0/features/browser/tabs.feature +16 -0
  122. cucu-1.0.0/features/browser/text.feature +92 -0
  123. cucu-1.0.0/features/cli/config.feature +165 -0
  124. cucu-1.0.0/features/cli/help.feature +26 -0
  125. cucu-1.0.0/features/cli/internals.feature +113 -0
  126. cucu-1.0.0/features/cli/ipdb.feature +16 -0
  127. cucu-1.0.0/features/cli/lint.feature +441 -0
  128. cucu-1.0.0/features/cli/lsp.feature +11 -0
  129. cucu-1.0.0/features/cli/report_basics.feature +340 -0
  130. cucu-1.0.0/features/cli/report_search_and_sorting.feature +69 -0
  131. cucu-1.0.0/features/cli/report_with_custom_failure_handler.feature +98 -0
  132. cucu-1.0.0/features/cli/report_with_custom_subheader.feature +69 -0
  133. cucu-1.0.0/features/cli/report_with_custom_tags.feature +81 -0
  134. cucu-1.0.0/features/cli/run.feature +112 -0
  135. cucu-1.0.0/features/cli/run_outputs.feature +253 -0
  136. cucu-1.0.0/features/cli/run_with_hooks.feature +343 -0
  137. cucu-1.0.0/features/cli/run_with_junit.feature +40 -0
  138. cucu-1.0.0/features/cli/run_with_logging.feature +46 -0
  139. cucu-1.0.0/features/cli/run_with_report.feature +29 -0
  140. cucu-1.0.0/features/cli/run_with_tags.feature +55 -0
  141. cucu-1.0.0/features/cli/run_with_thread_dumper.feature +25 -0
  142. cucu-1.0.0/features/cli/run_with_workers.feature +51 -0
  143. cucu-1.0.0/features/cli/secrets.feature +181 -0
  144. cucu-1.0.0/features/cli/steps.feature +59 -0
  145. cucu-1.0.0/features/cli/vars.feature +135 -0
  146. cucu-1.0.0/features/environment.py +31 -0
  147. cucu-1.0.0/features/flow_control/before_retry_handlers.feature +52 -0
  148. cucu-1.0.0/features/flow_control/repeating_steps.feature +29 -0
  149. cucu-1.0.0/features/flow_control/run_after_scenario_steps.feature +11 -0
  150. cucu-1.0.0/features/flow_control/run_and_measure.feature +86 -0
  151. cucu-1.0.0/features/flow_control/run_other_features.feature +12 -0
  152. cucu-1.0.0/features/flow_control/run_scenarios_conditionally.feature +55 -0
  153. cucu-1.0.0/features/flow_control/run_steps_conditionally.feature +60 -0
  154. cucu-1.0.0/features/flow_control/run_steps_on_element_visibilty.feature +39 -0
  155. cucu-1.0.0/features/flow_control/wait_for_steps.feature +76 -0
  156. cucu-1.0.0/features/os/command_steps.feature +64 -0
  157. cucu-1.0.0/features/os/file_steps.feature +24 -0
  158. cucu-1.0.0/features/os/platform_steps.feature +15 -0
  159. cucu-1.0.0/features/os/screenshot.feature +10 -0
  160. cucu-1.0.0/features/os/variables.feature +32 -0
  161. cucu-1.0.0/features/steps/__init__.py +2 -0
  162. cucu-1.0.0/features/steps/cucu_steps.py +17 -0
  163. cucu-1.0.0/logo.png +0 -0
  164. cucu-1.0.0/pyproject.toml +94 -0
  165. cucu-1.0.0/renovate.json +16 -0
  166. cucu-1.0.0/sonar-project.properties +6 -0
  167. cucu-1.0.0/src/cucu/__init__.py +38 -0
  168. cucu-1.0.0/src/cucu/ansi_parser.py +58 -0
  169. cucu-1.0.0/src/cucu/behave_tweaks.py +196 -0
  170. cucu-1.0.0/src/cucu/browser/__init__.py +0 -0
  171. cucu-1.0.0/src/cucu/browser/core.py +80 -0
  172. cucu-1.0.0/src/cucu/browser/frames.py +106 -0
  173. cucu-1.0.0/src/cucu/browser/selenium.py +323 -0
  174. cucu-1.0.0/src/cucu/browser/selenium_tweaks.py +27 -0
  175. cucu-1.0.0/src/cucu/cli/__init__.py +3 -0
  176. cucu-1.0.0/src/cucu/cli/core.py +788 -0
  177. cucu-1.0.0/src/cucu/cli/run.py +207 -0
  178. cucu-1.0.0/src/cucu/cli/steps.py +137 -0
  179. cucu-1.0.0/src/cucu/cli/thread_dumper.py +55 -0
  180. cucu-1.0.0/src/cucu/config.py +440 -0
  181. cucu-1.0.0/src/cucu/edgedriver_autoinstaller/README.md +1 -0
  182. cucu-1.0.0/src/cucu/edgedriver_autoinstaller/__init__.py +37 -0
  183. cucu-1.0.0/src/cucu/edgedriver_autoinstaller/utils.py +231 -0
  184. cucu-1.0.0/src/cucu/environment.py +283 -0
  185. cucu-1.0.0/src/cucu/external/jquery/jquery-3.5.1.min.js +2 -0
  186. cucu-1.0.0/src/cucu/formatter/__init__.py +0 -0
  187. cucu-1.0.0/src/cucu/formatter/cucu.py +261 -0
  188. cucu-1.0.0/src/cucu/formatter/json.py +321 -0
  189. cucu-1.0.0/src/cucu/formatter/junit.py +289 -0
  190. cucu-1.0.0/src/cucu/fuzzy/__init__.py +3 -0
  191. cucu-1.0.0/src/cucu/fuzzy/core.py +107 -0
  192. cucu-1.0.0/src/cucu/fuzzy/fuzzy.js +253 -0
  193. cucu-1.0.0/src/cucu/helpers.py +875 -0
  194. cucu-1.0.0/src/cucu/hooks.py +205 -0
  195. cucu-1.0.0/src/cucu/language_server/__init__.py +3 -0
  196. cucu-1.0.0/src/cucu/language_server/core.py +114 -0
  197. cucu-1.0.0/src/cucu/lint/__init__.py +0 -0
  198. cucu-1.0.0/src/cucu/lint/linter.py +397 -0
  199. cucu-1.0.0/src/cucu/lint/rules/format.yaml +125 -0
  200. cucu-1.0.0/src/cucu/logger.py +113 -0
  201. cucu-1.0.0/src/cucu/matcher/__init__.py +0 -0
  202. cucu-1.0.0/src/cucu/matcher/core.py +30 -0
  203. cucu-1.0.0/src/cucu/page_checks.py +63 -0
  204. cucu-1.0.0/src/cucu/reporter/__init__.py +3 -0
  205. cucu-1.0.0/src/cucu/reporter/external/bootstrap.min.css +7 -0
  206. cucu-1.0.0/src/cucu/reporter/external/bootstrap.min.js +7 -0
  207. cucu-1.0.0/src/cucu/reporter/external/dataTables.bootstrap.min.css +1 -0
  208. cucu-1.0.0/src/cucu/reporter/external/dataTables.bootstrap.min.js +14 -0
  209. cucu-1.0.0/src/cucu/reporter/external/jquery-3.5.1.min.js +2 -0
  210. cucu-1.0.0/src/cucu/reporter/external/jquery.dataTables.min.js +192 -0
  211. cucu-1.0.0/src/cucu/reporter/external/popper.min.js +5 -0
  212. cucu-1.0.0/src/cucu/reporter/favicon.png +0 -0
  213. cucu-1.0.0/src/cucu/reporter/html.py +452 -0
  214. cucu-1.0.0/src/cucu/reporter/templates/feature.html +72 -0
  215. cucu-1.0.0/src/cucu/reporter/templates/flat.html +48 -0
  216. cucu-1.0.0/src/cucu/reporter/templates/index.html +49 -0
  217. cucu-1.0.0/src/cucu/reporter/templates/layout.html +109 -0
  218. cucu-1.0.0/src/cucu/reporter/templates/scenario.html +200 -0
  219. cucu-1.0.0/src/cucu/steps/__init__.py +27 -0
  220. cucu-1.0.0/src/cucu/steps/base_steps.py +88 -0
  221. cucu-1.0.0/src/cucu/steps/browser_steps.py +337 -0
  222. cucu-1.0.0/src/cucu/steps/button_steps.py +91 -0
  223. cucu-1.0.0/src/cucu/steps/checkbox_steps.py +111 -0
  224. cucu-1.0.0/src/cucu/steps/command_steps.py +181 -0
  225. cucu-1.0.0/src/cucu/steps/comment_steps.py +17 -0
  226. cucu-1.0.0/src/cucu/steps/draggable_steps.py +168 -0
  227. cucu-1.0.0/src/cucu/steps/dropdown_steps.py +467 -0
  228. cucu-1.0.0/src/cucu/steps/file_input_steps.py +80 -0
  229. cucu-1.0.0/src/cucu/steps/filesystem_steps.py +144 -0
  230. cucu-1.0.0/src/cucu/steps/flow_control_steps.py +198 -0
  231. cucu-1.0.0/src/cucu/steps/image_steps.py +37 -0
  232. cucu-1.0.0/src/cucu/steps/input_steps.py +301 -0
  233. cucu-1.0.0/src/cucu/steps/link_steps.py +63 -0
  234. cucu-1.0.0/src/cucu/steps/menuitem_steps.py +39 -0
  235. cucu-1.0.0/src/cucu/steps/platform_steps.py +29 -0
  236. cucu-1.0.0/src/cucu/steps/radio_steps.py +187 -0
  237. cucu-1.0.0/src/cucu/steps/step_utils.py +55 -0
  238. cucu-1.0.0/src/cucu/steps/tab_steps.py +68 -0
  239. cucu-1.0.0/src/cucu/steps/table_steps.py +437 -0
  240. cucu-1.0.0/src/cucu/steps/tables.js +28 -0
  241. cucu-1.0.0/src/cucu/steps/text_steps.py +78 -0
  242. cucu-1.0.0/src/cucu/steps/variable_steps.py +100 -0
  243. cucu-1.0.0/src/cucu/steps/webserver_steps.py +40 -0
  244. cucu-1.0.0/src/cucu/utils.py +269 -0
  245. cucu-1.0.0/tests/__init__.py +0 -0
  246. cucu-1.0.0/tests/test_behave_tweaks.py +28 -0
  247. cucu-1.0.0/tests/test_browser.py +25 -0
  248. cucu-1.0.0/tests/test_config.py +133 -0
  249. cucu-1.0.0/tests/test_core.py +33 -0
  250. cucu-1.0.0/tests/test_language_server.py +32 -0
  251. cucu-1.0.0/tests/test_reporter_parser.py +12 -0
  252. cucu-1.0.0/tests/test_table_steps.py +55 -0
  253. cucu-1.0.0/uv.lock +1191 -0
  254. cucu-0.0.0/PKG-INFO +0 -13
  255. cucu-0.0.0/README.rst +0 -4
  256. cucu-0.0.0/setup.cfg +0 -8
  257. cucu-0.0.0/setup.py +0 -15
  258. cucu-0.0.0/src/cucu.egg-info/PKG-INFO +0 -13
  259. cucu-0.0.0/src/cucu.egg-info/SOURCES.txt +0 -7
  260. cucu-0.0.0/src/cucu.egg-info/dependency_links.txt +0 -1
  261. cucu-0.0.0/src/cucu.egg-info/top_level.txt +0 -1
@@ -0,0 +1,137 @@
1
+ # Use the latest 2.1 version of CircleCI pipeline process engine.
2
+ # See: https://circleci.com/docs/2.0/configuration-reference
3
+ ---
4
+ version: 2.1
5
+
6
+ workflows:
7
+ build-test-publish:
8
+ jobs:
9
+ - build
10
+ - test:
11
+ name: test-chrome
12
+ browser: chrome
13
+ requires:
14
+ - build
15
+ - test:
16
+ name: test-edge
17
+ browser: edge
18
+ requires:
19
+ - build
20
+ - test:
21
+ name: test-firefox
22
+ browser: firefox
23
+ requires:
24
+ - build
25
+
26
+ jobs:
27
+ build:
28
+ docker:
29
+ - image: cimg/python:3.12
30
+ resource_class: medium
31
+ steps:
32
+ - checkout
33
+ - inline-orb-uv/setup-uv
34
+ - run:
35
+ name: install cucu with Python 3.12
36
+ command: uv sync -p 3.12 --dev
37
+ - run:
38
+ name: run pre-commit validations
39
+ command: uv run pre-commit run --show-diff-on-failure --from-ref origin/HEAD --to-ref HEAD
40
+ - run:
41
+ name: build the cucu python package
42
+ command: uv build
43
+ - run:
44
+ name: install cucu globally
45
+ command: pip install dist/cucu-*.tar.gz
46
+
47
+ test:
48
+ parameters:
49
+ browser:
50
+ type: string
51
+ default: "chrome"
52
+ docker:
53
+ - image: cimg/python:3.12
54
+ - image: selenium/standalone-<<parameters.browser>>:124.0
55
+ environment:
56
+ SE_NODE_MAX_SESSIONS: 12
57
+ SE_NODE_SESSION_TIMEOUT: 300
58
+ SCREEN_WIDTH: 1366
59
+ SCREEN_HEIGHT: 768
60
+ resource_class: xlarge
61
+ steps:
62
+ - setup_remote_docker
63
+ - checkout
64
+ - inline-orb-uv/setup-uv
65
+ - run:
66
+ name: install cucu dependencies
67
+ command: uv sync
68
+ - run:
69
+ name: install test dependencies
70
+ command: |
71
+ set +eo pipefail
72
+ sudo apt-get update
73
+ sudo apt-get install -y expect
74
+ - run:
75
+ name: wait_for_selenium
76
+ # retry connection every 5s x 60 which is a total of 5 minutes
77
+ command: curl --retry 60 --retry-delay 5 --retry-connrefused http://localhost:4444
78
+ - run:
79
+ name: run_functional_tests
80
+ command: uv run cucu run features --workers 6 --selenium-remote-url http://localhost:4444 --generate-report --junit junit_results --browser "<<parameters.browser>>"
81
+ environment:
82
+ COVERAGE_PROCESS_START: pyproject.toml # set to config file
83
+ - run:
84
+ name: run unit tests
85
+ command: uv run coverage run -m pytest --junit-xml=results/unit-tests.xml
86
+ - run:
87
+ name: code_coverage_check
88
+ command: |
89
+ set +eo pipefail
90
+ uv run coverage combine .coverage.*
91
+ uv run coverage html
92
+ uv run coverage report
93
+ uv run coverage xml
94
+ mv coverage.xml coverage-<<parameters.browser>>.xml
95
+ - persist_to_workspace:
96
+ root: .
97
+ paths:
98
+ - coverage-<<parameters.browser>>.xml
99
+ - run:
100
+ name: tar up results and reporting
101
+ command: |
102
+ tar cvfz results.tgz results
103
+ tar cvfz report.tgz report
104
+ tar cvfz junit_results.tgz junit_results
105
+ when: always
106
+ - store_artifacts:
107
+ path: coverage-<<parameters.browser>>.xml
108
+ - store_artifacts:
109
+ path: results.tgz
110
+ - store_artifacts:
111
+ path: junit_results.tgz
112
+ - store_artifacts:
113
+ path: report.tgz
114
+ - store_test_results:
115
+ path: junit_results
116
+
117
+ orbs:
118
+ inline-orb-uv:
119
+ commands:
120
+ setup-uv:
121
+ steps:
122
+ - restore_cache:
123
+ keys:
124
+ - v1-uv-cache-{{ checksum "uv.lock" }}
125
+ - run:
126
+ name: Install uv
127
+ command: |
128
+ curl -LsSf https://astral.sh/uv/install.sh | sh
129
+ echo 'source $HOME/.cargo/env' >> $BASH_ENV
130
+ source $BASH_ENV
131
+ - save_cache:
132
+ paths:
133
+ - $HOME/.cargo/env
134
+ key: v1-uv-cache-{{ checksum "uv.lock" }}
135
+ - run:
136
+ name: Verify uv installation
137
+ command: uv --version
cucu-1.0.0/.env ADDED
@@ -0,0 +1 @@
1
+ export PYTHONBREAKPOINT="ipdb.set_trace"
@@ -0,0 +1,2 @@
1
+ # Ownership updated by devprod
2
+ * @dominodatalab/eng-automation
@@ -0,0 +1,25 @@
1
+ ## PR Type
2
+ What kind of change does this PR introduce?
3
+
4
+ <!-- Please check the one that applies to this PR using "x". -->
5
+ - [ ] Bugfix
6
+ - [ ] Feature
7
+ - [ ] Code style update (formatting)
8
+ - [ ] Refactoring (no functional changes)
9
+ - [ ] CI related changes
10
+ - [ ] Other... Please describe:
11
+
12
+ ## What is the current behavior?
13
+ <!-- Please describe the current behavior that you are modifying, or link to a relevant issue. -->
14
+
15
+ Issue Number: https://dominodatalab.atlassian.net/browse/
16
+
17
+ ## What is the new behavior?
18
+
19
+ ## Does this PR introduce a breaking change?
20
+ - [ ] Yes
21
+ - [ ] No
22
+
23
+ <!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. -->
24
+
25
+ ## Other information
@@ -0,0 +1,126 @@
1
+ name: build
2
+ # This is a beta version of migrating the CircleCI build to GH Actions
3
+ # TODO: Figure out and prevent firefox and edge tests getting auto-cancelled (out of memory?)
4
+ # TODO: Combine coverage reports in another job
5
+
6
+ on:
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ lint:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+ - name: Install the latest version of uv
15
+ uses: astral-sh/setup-uv@v2
16
+ with:
17
+ enable-cache: true
18
+ - name: Install cucu with Python 3.12
19
+ run: |
20
+ uv sync -p 3.12 --dev
21
+ - name: Run pre-commit
22
+ run: |
23
+ uv run pre-commit run
24
+
25
+ unit:
26
+ needs: lint
27
+ runs-on: ubuntu-latest
28
+ steps:
29
+ - uses: actions/checkout@v4
30
+ - name: Install the latest version of uv
31
+ uses: astral-sh/setup-uv@v2
32
+ with:
33
+ enable-cache: true
34
+ - name: Install cucu with Python 3.12
35
+ run: |
36
+ uv sync -p 3.12 --dev
37
+ - name: unit tests
38
+ run: |
39
+ uv run coverage run -m pytest --junit-xml=output/unit-tests.xml
40
+ - name: package results
41
+ if: always()
42
+ run: |
43
+ mkdir -p output
44
+ mv .coverage.* output/
45
+ tar cvfz output.tgz output
46
+ - name: save output
47
+ if: always()
48
+ uses: actions/upload-artifact@v4
49
+ with:
50
+ name: unit-tests
51
+ path: output.tgz
52
+ - name: Publish Test Results
53
+ uses: EnricoMi/publish-unit-test-result-action@v2
54
+ if: always()
55
+ with:
56
+ check_name: "unit results"
57
+ files: |
58
+ output/unit-tests.xml
59
+
60
+ cucu:
61
+ needs: unit
62
+ runs-on: ubuntu-latest
63
+ strategy:
64
+ matrix:
65
+ browser: ["chrome", "firefox", "edge"]
66
+ permissions: # to publish junit results - see https://github.com/EnricoMi/publish-unit-test-result-action?tab=readme-ov-file#permissions
67
+ contents: read
68
+ issues: read
69
+ checks: write
70
+ pull-requests: write
71
+ services:
72
+ webserver:
73
+ image: selenium/standalone-${{ matrix.browser }}:124.0
74
+ ports:
75
+ - 4444:4444
76
+ options: --shm-size=4gb
77
+ env:
78
+ SE_NODE_MAX_SESSIONS: 12
79
+ SE_NODE_SESSION_TIMEOUT: 300
80
+ SCREEN_WIDTH: 1366
81
+ SCREEN_HEIGHT: 768
82
+
83
+ steps:
84
+ - uses: actions/checkout@v4
85
+ - name: Install the latest version of uv
86
+ uses: astral-sh/setup-uv@v2
87
+ with:
88
+ enable-cache: true
89
+ - name: Install Python 3.12
90
+ run: |
91
+ uv python install 3.12
92
+ uv sync
93
+ - name: wait_for_selenium
94
+ # retry connection every 2s x 60 which is a total of 2 minutes
95
+ run: curl --retry 60 --retry-delay 2 --retry-connrefused http://localhost:4444
96
+ - name: UI tests
97
+ run: |
98
+ uv run cucu run features --browser "${{ matrix.browser }}" --workers 1 --generate-report --report output/report --junit output/junit --selenium-remote-url http://localhost:4444
99
+ env:
100
+ COVERAGE_PROCESS_START: pyproject.toml
101
+ SE_NODE_MAX_SESSIONS: 12
102
+ SE_NODE_SESSION_TIMEOUT: 300
103
+ SCREEN_WIDTH: 1366
104
+ SCREEN_HEIGHT: 768
105
+ DISPLAY: :99 # Needed for headless mode
106
+ SELENIUM_HOST: localhost
107
+ SELENIUM_PORT: 4444
108
+ - name: package results
109
+ if: always()
110
+ run: |
111
+ mkdir -p output
112
+ mv .coverage.* output/
113
+ tar cvfz output.tgz output
114
+ - name: save output
115
+ if: always()
116
+ uses: actions/upload-artifact@v4
117
+ with:
118
+ name: ${{ matrix.browser }}-tests
119
+ path: output.tgz
120
+ - name: Publish Test Results
121
+ uses: EnricoMi/publish-unit-test-result-action@v2
122
+ if: always()
123
+ with:
124
+ check_name: "${{ matrix.browser }} results"
125
+ files: |
126
+ output/junit/**/*.xml
@@ -0,0 +1,45 @@
1
+ name: Create a New Release
2
+ # The following job is run when a commit changes pyproject.toml file:
3
+ # * Checks if the version of the project is the same of the latest release
4
+ # * If not, create a new release and then start the publishing
5
+ # * to test.pypi.org job
6
+
7
+ on:
8
+ push:
9
+ branches:
10
+ - 'main'
11
+ paths:
12
+ - 'pyproject.toml'
13
+
14
+ jobs:
15
+ create-release-if-new-version:
16
+ runs-on: "ubuntu-latest"
17
+ steps:
18
+ - id: check_out
19
+ name: Check out code
20
+ uses: actions/checkout@v4
21
+ - id: release_if_needed
22
+ name: Release on version change merged
23
+ env:
24
+ GITHUB_TOKEN: ${{ github.token }}
25
+ run: |
26
+ version=$(sed -n "s/^version *= *\"\(.*\)\"/\1/p" pyproject.toml)
27
+ latest_release=$(gh api /repos/dominodatalab/cucu/releases/latest --jq '.tag_name')
28
+ if [[ $version != $latest_release ]]; then
29
+ gh api \
30
+ --method POST \
31
+ -H "Accept: application/vnd.github+json" \
32
+ /repos/dominodatalab/cucu/releases \
33
+ -f tag_name=$version \
34
+ -f name="v$version" \
35
+ -F draft=false \
36
+ -F prerelease=false \
37
+ -F generate_release_notes=true
38
+ fi
39
+ - name: trigger publish-test workflow
40
+ run: |
41
+ curl -X POST \
42
+ -H "Authorization: token ${{ github.token }}" \
43
+ -H "Accept: application/vnd.github+json" \
44
+ https://api.github.com/repos/${GITHUB_REPOSITORY}/dispatches \
45
+ -d '{"event_type": "trigger_publish_test"}'
@@ -0,0 +1,31 @@
1
+ name: publish-production
2
+ # publish to pypi.org on merge to default branch
3
+
4
+ on:
5
+ workflow_dispatch:
6
+
7
+ jobs:
8
+ publish-production-main:
9
+ environment: cucu-publish-production # match name in www.PyPI.org OIDC
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ id-token: write # Required for connection to pypi OIDC
13
+ contents: read # For non-public repo
14
+ steps:
15
+ - name: checkout main
16
+ uses: actions/checkout@v4
17
+ with:
18
+ ref: main
19
+ fetch-depth: 0
20
+ - name: Install the latest version of uv
21
+ uses: astral-sh/setup-uv@v2
22
+ with:
23
+ enable-cache: true
24
+ - name: Install cucu with Python 3.12
25
+ run: |
26
+ uv sync -p 3.12
27
+ - name: build package
28
+ run: |
29
+ uv build
30
+ - name: publish to pypi.org
31
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,35 @@
1
+ name: publish-test
2
+ # publish to test.pypi.org on merge to default branch
3
+
4
+ on:
5
+ workflow_dispatch:
6
+ repository_dispatch:
7
+ types: [trigger_publish_test]
8
+
9
+ jobs:
10
+ publish-test-main:
11
+ environment: cucu-publish-test # match name in test.PyPI.org OIDC
12
+ runs-on: ubuntu-latest
13
+ permissions:
14
+ id-token: write # Required for connection to pypi OIDC
15
+ contents: read # For non-public repo
16
+ steps:
17
+ - name: checkout main
18
+ uses: actions/checkout@v4
19
+ with:
20
+ ref: main
21
+ fetch-depth: 0
22
+ - name: Install the latest version of uv
23
+ uses: astral-sh/setup-uv@v2
24
+ with:
25
+ version: "latest"
26
+ - name: Install cucu with Python 3.12
27
+ run: |
28
+ uv sync -p 3.12
29
+ - name: build package
30
+ run: |
31
+ uv build
32
+ - name: publish to test.pypi.org
33
+ uses: pypa/gh-action-pypi-publish@release/v1
34
+ with:
35
+ repository-url: https://test.pypi.org/legacy/
cucu-1.0.0/.gitignore ADDED
@@ -0,0 +1,190 @@
1
+ dist
2
+ .cache
3
+ .coverage.*
4
+ .DS_Store
5
+ *.egg-info
6
+ htmlcov
7
+ .nox
8
+ .ruff_cache
9
+ terraform.tfstate
10
+ terraform.tfstate.backup
11
+ .terraform
12
+ .pytest_cache
13
+ __pycache__
14
+ *.pyc
15
+ pygls.log
16
+ junit_results/
17
+ report/
18
+ results/
19
+ .monitor.png
20
+ geckodriver.log
21
+
22
+ # Byte-compiled / optimized / DLL files
23
+ __pycache__/
24
+ *.py[cod]
25
+ *$py.class
26
+
27
+ # C extensions
28
+ *.so
29
+
30
+ # Distribution / packaging
31
+ .Python
32
+ build/
33
+ develop-eggs/
34
+ dist/
35
+ downloads/
36
+ eggs/
37
+ .eggs/
38
+ lib/
39
+ lib64/
40
+ parts/
41
+ sdist/
42
+ var/
43
+ wheels/
44
+ share/python-wheels/
45
+ *.egg-info/
46
+ .installed.cfg
47
+ *.egg
48
+ MANIFEST
49
+
50
+ ## COMMON - PYTHON (from https://github.com/github/gitignore/blob/main/Python.gitignore)
51
+ # PyInstaller
52
+ # Usually these files are written by a python script from a template
53
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
54
+ *.manifest
55
+ *.spec
56
+
57
+ # Installer logs
58
+ pip-log.txt
59
+ pip-delete-this-directory.txt
60
+
61
+ # Unit test / coverage reports
62
+ htmlcov/
63
+ .tox/
64
+ .nox/
65
+ .coverage
66
+ .coverage.*
67
+ .cache
68
+ nosetests.xml
69
+ coverage.xml
70
+ *.cover
71
+ *.py,cover
72
+ .hypothesis/
73
+ .pytest_cache/
74
+ cover/
75
+
76
+ # Translations
77
+ *.mo
78
+ *.pot
79
+
80
+ # Django stuff:
81
+ local_settings.py
82
+ db.sqlite3
83
+ db.sqlite3-journal
84
+
85
+ # Flask stuff:
86
+ instance/
87
+ .webassets-cache
88
+
89
+ # Scrapy stuff:
90
+ .scrapy
91
+
92
+ # Sphinx documentation
93
+ docs/_build/
94
+
95
+ # PyBuilder
96
+ .pybuilder/
97
+ target/
98
+
99
+ # Jupyter Notebook
100
+ .ipynb_checkpoints
101
+
102
+ # IPython
103
+ profile_default/
104
+ ipython_config.py
105
+
106
+
107
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
108
+ __pypackages__/
109
+
110
+ # Celery stuff
111
+ celerybeat-schedule
112
+ celerybeat.pid
113
+
114
+ # SageMath parsed files
115
+ *.sage.py
116
+
117
+ # Environments
118
+ .venv
119
+ env/
120
+ venv/
121
+ ENV/
122
+ env.bak/
123
+ venv.bak/
124
+
125
+ # Spyder project settings
126
+ .spyderproject
127
+ .spyproject
128
+
129
+ # Rope project settings
130
+ .ropeproject
131
+
132
+ # mkdocs documentation
133
+ /site
134
+
135
+ # mypy
136
+ .mypy_cache/
137
+ .dmypy.json
138
+ dmypy.json
139
+
140
+ # Pyre type checker
141
+ .pyre/
142
+
143
+ # pytype static type analyzer
144
+ .pytype/
145
+
146
+ # Cython debug symbols
147
+ cython_debug/
148
+
149
+
150
+ ## COMMON - TERRAFORM (from https://github.com/github/gitignore/blob/main/Terraform.gitignore)
151
+ # Local .terraform directories
152
+ **/.terraform/*
153
+
154
+ # .tfstate files
155
+ *.tfstate
156
+ *.tfstate.*
157
+
158
+ # Crash log files
159
+ crash.log
160
+ crash.*.log
161
+
162
+ # Exclude all .tfvars files, which are likely to contain sensitive data, such as
163
+ # password, private keys, and other secrets. These should not be part of version
164
+ # control as they are data points which are potentially sensitive and subject
165
+ # to change depending on the environment.
166
+ *.tfvars
167
+ *.tfvars.json
168
+
169
+ # Ignore override files as they are usually used to override resources locally and so
170
+ # are not checked in
171
+ override.tf
172
+ override.tf.json
173
+ *_override.tf
174
+ *_override.tf.json
175
+
176
+ # Include override files you do wish to add to version control using negated pattern
177
+ # !example_override.tf
178
+
179
+ # Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan
180
+ # example: *tfplan*
181
+
182
+ # Ignore CLI configuration files
183
+ .terraformrc
184
+ terraform.rc
185
+
186
+ # VSCode
187
+ .vscode
188
+
189
+ # generated during test run
190
+ skip_first_scenario.txt
@@ -0,0 +1,21 @@
1
+ exclude: "^features/cli/lint.feature|^data/features/feature_with_mixed_results.feature"
2
+ repos:
3
+ - repo: https://github.com/pre-commit/pre-commit-hooks
4
+ rev: v4.6.0
5
+ hooks:
6
+ - id: check-merge-conflict
7
+ - id: check-toml
8
+ - id: check-yaml
9
+ - id: check-xml
10
+ - id: end-of-file-fixer
11
+ - id: trailing-whitespace
12
+ - id: detect-private-key
13
+ - repo: local
14
+ hooks:
15
+ - id: makefile
16
+ name: run make lint
17
+ entry: make
18
+ args: ["lint"]
19
+ language: system
20
+ pass_filenames: false
21
+ verbose: true
@@ -0,0 +1 @@
1
+ 3.12