smart-tests-cli 2.0.0rc1__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 (338) hide show
  1. smart_tests_cli-2.0.0rc1/.bazelrc +4 -0
  2. smart_tests_cli-2.0.0rc1/.bazelversion +1 -0
  3. smart_tests_cli-2.0.0rc1/.editorconfig +11 -0
  4. smart_tests_cli-2.0.0rc1/.github/release.yml +4 -0
  5. smart_tests_cli-2.0.0rc1/.github/workflows/bazel-test.yml +34 -0
  6. smart_tests_cli-2.0.0rc1/.github/workflows/e2e.yml +133 -0
  7. smart_tests_cli-2.0.0rc1/.github/workflows/publish.yml +95 -0
  8. smart_tests_cli-2.0.0rc1/.github/workflows/test.yml +95 -0
  9. smart_tests_cli-2.0.0rc1/.github/workflows/update_maven_install_json.yml +40 -0
  10. smart_tests_cli-2.0.0rc1/.gitignore +147 -0
  11. smart_tests_cli-2.0.0rc1/.pre-commit-config.yaml +39 -0
  12. smart_tests_cli-2.0.0rc1/.python-version +1 -0
  13. smart_tests_cli-2.0.0rc1/.tagpr +43 -0
  14. smart_tests_cli-2.0.0rc1/CONTRIBUTING.md +19 -0
  15. smart_tests_cli-2.0.0rc1/Dockerfile +26 -0
  16. smart_tests_cli-2.0.0rc1/LICENSE.txt +202 -0
  17. smart_tests_cli-2.0.0rc1/PKG-INFO +168 -0
  18. smart_tests_cli-2.0.0rc1/README.md +145 -0
  19. smart_tests_cli-2.0.0rc1/WORKSPACE +56 -0
  20. smart_tests_cli-2.0.0rc1/build-java.sh +4 -0
  21. smart_tests_cli-2.0.0rc1/pyproject.toml +62 -0
  22. smart_tests_cli-2.0.0rc1/renovate.json +9 -0
  23. smart_tests_cli-2.0.0rc1/setup.cfg +4 -0
  24. smart_tests_cli-2.0.0rc1/setup.py +3 -0
  25. smart_tests_cli-2.0.0rc1/smart_tests/__init__.py +0 -0
  26. smart_tests_cli-2.0.0rc1/smart_tests/__main__.py +171 -0
  27. smart_tests_cli-2.0.0rc1/smart_tests/app.py +11 -0
  28. smart_tests_cli-2.0.0rc1/smart_tests/commands/__init__.py +0 -0
  29. smart_tests_cli-2.0.0rc1/smart_tests/commands/helper.py +79 -0
  30. smart_tests_cli-2.0.0rc1/smart_tests/commands/inspect/__init__.py +7 -0
  31. smart_tests_cli-2.0.0rc1/smart_tests/commands/inspect/subset.py +141 -0
  32. smart_tests_cli-2.0.0rc1/smart_tests/commands/record/__init__.py +12 -0
  33. smart_tests_cli-2.0.0rc1/smart_tests/commands/record/attachment.py +43 -0
  34. smart_tests_cli-2.0.0rc1/smart_tests/commands/record/build.py +347 -0
  35. smart_tests_cli-2.0.0rc1/smart_tests/commands/record/case_event.py +189 -0
  36. smart_tests_cli-2.0.0rc1/smart_tests/commands/record/commit.py +151 -0
  37. smart_tests_cli-2.0.0rc1/smart_tests/commands/record/session.py +226 -0
  38. smart_tests_cli-2.0.0rc1/smart_tests/commands/record/tests.py +622 -0
  39. smart_tests_cli-2.0.0rc1/smart_tests/commands/stats/__init__.py +7 -0
  40. smart_tests_cli-2.0.0rc1/smart_tests/commands/stats/test_sessions.py +44 -0
  41. smart_tests_cli-2.0.0rc1/smart_tests/commands/subset.py +588 -0
  42. smart_tests_cli-2.0.0rc1/smart_tests/commands/test_path_writer.py +66 -0
  43. smart_tests_cli-2.0.0rc1/smart_tests/commands/verify.py +152 -0
  44. smart_tests_cli-2.0.0rc1/smart_tests/jar/exe_deploy.jar +0 -0
  45. smart_tests_cli-2.0.0rc1/smart_tests/plugins/__init__.py +0 -0
  46. smart_tests_cli-2.0.0rc1/smart_tests/test_runners/__init__.py +0 -0
  47. smart_tests_cli-2.0.0rc1/smart_tests/test_runners/adb.py +23 -0
  48. smart_tests_cli-2.0.0rc1/smart_tests/test_runners/ant.py +32 -0
  49. smart_tests_cli-2.0.0rc1/smart_tests/test_runners/bazel.py +98 -0
  50. smart_tests_cli-2.0.0rc1/smart_tests/test_runners/behave.py +59 -0
  51. smart_tests_cli-2.0.0rc1/smart_tests/test_runners/ctest.py +159 -0
  52. smart_tests_cli-2.0.0rc1/smart_tests/test_runners/cts.py +185 -0
  53. smart_tests_cli-2.0.0rc1/smart_tests/test_runners/cucumber.py +448 -0
  54. smart_tests_cli-2.0.0rc1/smart_tests/test_runners/cypress.py +43 -0
  55. smart_tests_cli-2.0.0rc1/smart_tests/test_runners/dotnet.py +102 -0
  56. smart_tests_cli-2.0.0rc1/smart_tests/test_runners/file.py +57 -0
  57. smart_tests_cli-2.0.0rc1/smart_tests/test_runners/flutter.py +249 -0
  58. smart_tests_cli-2.0.0rc1/smart_tests/test_runners/go_test.py +94 -0
  59. smart_tests_cli-2.0.0rc1/smart_tests/test_runners/googletest.py +33 -0
  60. smart_tests_cli-2.0.0rc1/smart_tests/test_runners/gradle.py +89 -0
  61. smart_tests_cli-2.0.0rc1/smart_tests/test_runners/jest.py +48 -0
  62. smart_tests_cli-2.0.0rc1/smart_tests/test_runners/maven.py +142 -0
  63. smart_tests_cli-2.0.0rc1/smart_tests/test_runners/minitest.py +37 -0
  64. smart_tests_cli-2.0.0rc1/smart_tests/test_runners/nunit.py +186 -0
  65. smart_tests_cli-2.0.0rc1/smart_tests/test_runners/playwright.py +246 -0
  66. smart_tests_cli-2.0.0rc1/smart_tests/test_runners/prove.py +69 -0
  67. smart_tests_cli-2.0.0rc1/smart_tests/test_runners/pytest.py +310 -0
  68. smart_tests_cli-2.0.0rc1/smart_tests/test_runners/raw.py +224 -0
  69. smart_tests_cli-2.0.0rc1/smart_tests/test_runners/robot.py +119 -0
  70. smart_tests_cli-2.0.0rc1/smart_tests/test_runners/rspec.py +4 -0
  71. smart_tests_cli-2.0.0rc1/smart_tests/test_runners/smart_tests.py +154 -0
  72. smart_tests_cli-2.0.0rc1/smart_tests/test_runners/vitest.py +42 -0
  73. smart_tests_cli-2.0.0rc1/smart_tests/test_runners/xctest.py +72 -0
  74. smart_tests_cli-2.0.0rc1/smart_tests/testpath.py +154 -0
  75. smart_tests_cli-2.0.0rc1/smart_tests/utils/__init__.py +0 -0
  76. smart_tests_cli-2.0.0rc1/smart_tests/utils/authentication.py +76 -0
  77. smart_tests_cli-2.0.0rc1/smart_tests/utils/ci_provider.py +7 -0
  78. smart_tests_cli-2.0.0rc1/smart_tests/utils/commit_ingester.py +59 -0
  79. smart_tests_cli-2.0.0rc1/smart_tests/utils/common_tz.py +12 -0
  80. smart_tests_cli-2.0.0rc1/smart_tests/utils/dynamic_commands.py +296 -0
  81. smart_tests_cli-2.0.0rc1/smart_tests/utils/env_keys.py +19 -0
  82. smart_tests_cli-2.0.0rc1/smart_tests/utils/exceptions.py +22 -0
  83. smart_tests_cli-2.0.0rc1/smart_tests/utils/file_name_pattern.py +4 -0
  84. smart_tests_cli-2.0.0rc1/smart_tests/utils/git_log_parser.py +53 -0
  85. smart_tests_cli-2.0.0rc1/smart_tests/utils/glob.py +44 -0
  86. smart_tests_cli-2.0.0rc1/smart_tests/utils/gzipgen.py +46 -0
  87. smart_tests_cli-2.0.0rc1/smart_tests/utils/http_client.py +201 -0
  88. smart_tests_cli-2.0.0rc1/smart_tests/utils/java.py +58 -0
  89. smart_tests_cli-2.0.0rc1/smart_tests/utils/launchable_client.py +105 -0
  90. smart_tests_cli-2.0.0rc1/smart_tests/utils/link.py +68 -0
  91. smart_tests_cli-2.0.0rc1/smart_tests/utils/logger.py +53 -0
  92. smart_tests_cli-2.0.0rc1/smart_tests/utils/no_build.py +2 -0
  93. smart_tests_cli-2.0.0rc1/smart_tests/utils/sax.py +119 -0
  94. smart_tests_cli-2.0.0rc1/smart_tests/utils/subprocess.py +12 -0
  95. smart_tests_cli-2.0.0rc1/smart_tests/utils/test_runner_registry.py +117 -0
  96. smart_tests_cli-2.0.0rc1/smart_tests/utils/tracking.py +102 -0
  97. smart_tests_cli-2.0.0rc1/smart_tests/utils/typer_types.py +219 -0
  98. smart_tests_cli-2.0.0rc1/smart_tests/version.py +7 -0
  99. smart_tests_cli-2.0.0rc1/src/BUILD +0 -0
  100. smart_tests_cli-2.0.0rc1/src/main/java/com/launchableinc/ingest/commits/Authenticator.java +14 -0
  101. smart_tests_cli-2.0.0rc1/src/main/java/com/launchableinc/ingest/commits/BUILD +28 -0
  102. smart_tests_cli-2.0.0rc1/src/main/java/com/launchableinc/ingest/commits/CommitGraphCollector.java +479 -0
  103. smart_tests_cli-2.0.0rc1/src/main/java/com/launchableinc/ingest/commits/CommitIngester.java +188 -0
  104. smart_tests_cli-2.0.0rc1/src/main/java/com/launchableinc/ingest/commits/CountingDiffFormatter.java +53 -0
  105. smart_tests_cli-2.0.0rc1/src/main/java/com/launchableinc/ingest/commits/GitHubActionsAuthenticator.java +29 -0
  106. smart_tests_cli-2.0.0rc1/src/main/java/com/launchableinc/ingest/commits/GitHubIdTokenAuthenticator.java +59 -0
  107. smart_tests_cli-2.0.0rc1/src/main/java/com/launchableinc/ingest/commits/JSCommit.java +121 -0
  108. smart_tests_cli-2.0.0rc1/src/main/java/com/launchableinc/ingest/commits/JSFileChange.java +87 -0
  109. smart_tests_cli-2.0.0rc1/src/main/java/com/launchableinc/ingest/commits/ObjectRevFilter.java +27 -0
  110. smart_tests_cli-2.0.0rc1/src/main/java/com/launchableinc/ingest/commits/SSLBypass.java +49 -0
  111. smart_tests_cli-2.0.0rc1/src/main/java/com/launchableinc/ingest/commits/TokenAuthenticator.java +18 -0
  112. smart_tests_cli-2.0.0rc1/src/maven_install.json +2347 -0
  113. smart_tests_cli-2.0.0rc1/src/smart_tests_cli.egg-info/PKG-INFO +168 -0
  114. smart_tests_cli-2.0.0rc1/src/smart_tests_cli.egg-info/SOURCES.txt +336 -0
  115. smart_tests_cli-2.0.0rc1/src/smart_tests_cli.egg-info/dependency_links.txt +1 -0
  116. smart_tests_cli-2.0.0rc1/src/smart_tests_cli.egg-info/entry_points.txt +2 -0
  117. smart_tests_cli-2.0.0rc1/src/smart_tests_cli.egg-info/requires.txt +7 -0
  118. smart_tests_cli-2.0.0rc1/src/smart_tests_cli.egg-info/top_level.txt +2 -0
  119. smart_tests_cli-2.0.0rc1/src/test/java/com/launchableinc/ingest/commits/AllTests.java +13 -0
  120. smart_tests_cli-2.0.0rc1/src/test/java/com/launchableinc/ingest/commits/BUILD +21 -0
  121. smart_tests_cli-2.0.0rc1/src/test/java/com/launchableinc/ingest/commits/CommitGraphCollectorTest.java +172 -0
  122. smart_tests_cli-2.0.0rc1/src/test/java/com/launchableinc/ingest/commits/CommitIngesterTest.java +76 -0
  123. smart_tests_cli-2.0.0rc1/src/test/java/com/launchableinc/ingest/commits/SSLBypassTest.java +13 -0
  124. smart_tests_cli-2.0.0rc1/src/test/java/com/launchableinc/ingest/commits/java8-compat.sh +23 -0
  125. smart_tests_cli-2.0.0rc1/test-runner/__main__.py +22 -0
  126. smart_tests_cli-2.0.0rc1/tests/__init__.py +0 -0
  127. smart_tests_cli-2.0.0rc1/tests/cli_test_case.py +326 -0
  128. smart_tests_cli-2.0.0rc1/tests/commands/__init__.py +0 -0
  129. smart_tests_cli-2.0.0rc1/tests/commands/inspect/__init__.py +0 -0
  130. smart_tests_cli-2.0.0rc1/tests/commands/inspect/test_subset.py +83 -0
  131. smart_tests_cli-2.0.0rc1/tests/commands/record/__init__.py +0 -0
  132. smart_tests_cli-2.0.0rc1/tests/commands/record/test_attachment.py +55 -0
  133. smart_tests_cli-2.0.0rc1/tests/commands/record/test_build.py +314 -0
  134. smart_tests_cli-2.0.0rc1/tests/commands/record/test_case_event.py +37 -0
  135. smart_tests_cli-2.0.0rc1/tests/commands/record/test_commit.py +52 -0
  136. smart_tests_cli-2.0.0rc1/tests/commands/record/test_session.py +271 -0
  137. smart_tests_cli-2.0.0rc1/tests/commands/record/test_tests.py +119 -0
  138. smart_tests_cli-2.0.0rc1/tests/commands/test_api_error.py +465 -0
  139. smart_tests_cli-2.0.0rc1/tests/commands/test_helper.py +63 -0
  140. smart_tests_cli-2.0.0rc1/tests/commands/test_subset.py +635 -0
  141. smart_tests_cli-2.0.0rc1/tests/commands/test_verify.py +39 -0
  142. smart_tests_cli-2.0.0rc1/tests/data/adb/subset_result.json +15 -0
  143. smart_tests_cli-2.0.0rc1/tests/data/ant/junitreport/TEST-com.example.HelloWorldTest.xml +84 -0
  144. smart_tests_cli-2.0.0rc1/tests/data/ant/junitreport/TEST-com.example.library.CacheTest.xml +79 -0
  145. smart_tests_cli-2.0.0rc1/tests/data/ant/junitreport/TESTS-TestSuites.xml +316 -0
  146. smart_tests_cli-2.0.0rc1/tests/data/ant/record_test_result.json +63 -0
  147. smart_tests_cli-2.0.0rc1/tests/data/ant/src/com/example/HelloWorld.java +11 -0
  148. smart_tests_cli-2.0.0rc1/tests/data/ant/src/com/example/HelloWorldTest.java +18 -0
  149. smart_tests_cli-2.0.0rc1/tests/data/ant/src/com/example/library/Cache.java +18 -0
  150. smart_tests_cli-2.0.0rc1/tests/data/ant/src/com/example/library/CacheTest.java +16 -0
  151. smart_tests_cli-2.0.0rc1/tests/data/ant/subset_result.json +11 -0
  152. smart_tests_cli-2.0.0rc1/tests/data/bazel/bazel-testlogs/src/test/java/com/ninjinkun/mylib_test1/test.cache_status +0 -0
  153. smart_tests_cli-2.0.0rc1/tests/data/bazel/bazel-testlogs/src/test/java/com/ninjinkun/mylib_test1/test.xml +7 -0
  154. smart_tests_cli-2.0.0rc1/tests/data/bazel/bazel-testlogs/src/test/java/com/ninjinkun/mylib_test2/test.cache_status +0 -0
  155. smart_tests_cli-2.0.0rc1/tests/data/bazel/bazel-testlogs/src/test/java/com/ninjinkun/mylib_test2/test.xml +7 -0
  156. smart_tests_cli-2.0.0rc1/tests/data/bazel/bazel-testlogs/src/test/java/com/ninjinkun/mylib_test3/test.cache_status +0 -0
  157. smart_tests_cli-2.0.0rc1/tests/data/bazel/bazel-testlogs/src/test/java/com/ninjinkun/mylib_test3/test.xml +7 -0
  158. smart_tests_cli-2.0.0rc1/tests/data/bazel/bazel-testlogs/src/test/java/com/ninjinkun/mylib_test4/test.cache_status +0 -0
  159. smart_tests_cli-2.0.0rc1/tests/data/bazel/bazel-testlogs/src/test/java/com/ninjinkun/mylib_test4/test.xml +7 -0
  160. smart_tests_cli-2.0.0rc1/tests/data/bazel/bazel-testlogs/src/test/java/com/ninjinkun/mylib_test5/test.cache_status +0 -0
  161. smart_tests_cli-2.0.0rc1/tests/data/bazel/bazel-testlogs/src/test/java/com/ninjinkun/mylib_test5/test.xml +7 -0
  162. smart_tests_cli-2.0.0rc1/tests/data/bazel/bazel-testlogs/src/test/java/com/ninjinkun/mylib_test6/test.cache_status +0 -0
  163. smart_tests_cli-2.0.0rc1/tests/data/bazel/bazel-testlogs/src/test/java/com/ninjinkun/mylib_test6/test.xml +7 -0
  164. smart_tests_cli-2.0.0rc1/tests/data/bazel/bazel-testlogs/src/test/java/com/ninjinkun/mylib_test7/test.cache_status +0 -0
  165. smart_tests_cli-2.0.0rc1/tests/data/bazel/bazel-testlogs/src/test/java/com/ninjinkun/mylib_test7/test.xml +7 -0
  166. smart_tests_cli-2.0.0rc1/tests/data/bazel/bazel-testlogs/src/test/java/com/ninjinkun/mylib_test8/test.cache_status +0 -0
  167. smart_tests_cli-2.0.0rc1/tests/data/bazel/bazel-testlogs/src/test/java/com/ninjinkun/mylib_test8/test.xml +7 -0
  168. smart_tests_cli-2.0.0rc1/tests/data/bazel/bazel-testlogs/src/test/java/com/ninjinkun/mylib_test9/test.cache_status +0 -0
  169. smart_tests_cli-2.0.0rc1/tests/data/bazel/bazel-testlogs/src/test/java/com/ninjinkun/mylib_test9/test.xml +7 -0
  170. smart_tests_cli-2.0.0rc1/tests/data/bazel/build_event.json +36 -0
  171. smart_tests_cli-2.0.0rc1/tests/data/bazel/build_event_rest.json +30 -0
  172. smart_tests_cli-2.0.0rc1/tests/data/bazel/record_test_result.json +135 -0
  173. smart_tests_cli-2.0.0rc1/tests/data/bazel/record_test_with_build_event_json_result.json +51 -0
  174. smart_tests_cli-2.0.0rc1/tests/data/bazel/record_test_with_multiple_build_event_json_result.json +79 -0
  175. smart_tests_cli-2.0.0rc1/tests/data/bazel/subset_result.json +45 -0
  176. smart_tests_cli-2.0.0rc1/tests/data/behave/record_test_result.json +31 -0
  177. smart_tests_cli-2.0.0rc1/tests/data/behave/reports/report.xml +12 -0
  178. smart_tests_cli-2.0.0rc1/tests/data/behave/subset_result.json +12 -0
  179. smart_tests_cli-2.0.0rc1/tests/data/broken_xml/broken.xml +1 -0
  180. smart_tests_cli-2.0.0rc1/tests/data/broken_xml/normal.xml +5 -0
  181. smart_tests_cli-2.0.0rc1/tests/data/ctest/Testing/latest/Test.xml +202 -0
  182. smart_tests_cli-2.0.0rc1/tests/data/ctest/ctest_list.json +155 -0
  183. smart_tests_cli-2.0.0rc1/tests/data/ctest/record_test_result.json +65 -0
  184. smart_tests_cli-2.0.0rc1/tests/data/ctest/subset_result.json +13 -0
  185. smart_tests_cli-2.0.0rc1/tests/data/cts/record_test_result.json +251 -0
  186. smart_tests_cli-2.0.0rc1/tests/data/cts/subset_result.json +38 -0
  187. smart_tests_cli-2.0.0rc1/tests/data/cts/test_result.xml +44 -0
  188. smart_tests_cli-2.0.0rc1/tests/data/cucumber/features/foo/bar.feature +6 -0
  189. smart_tests_cli-2.0.0rc1/tests/data/cucumber/features/foo/is_it_friday_yet.feature +28 -0
  190. smart_tests_cli-2.0.0rc1/tests/data/cucumber/features/foo-bar.feature +6 -0
  191. smart_tests_cli-2.0.0rc1/tests/data/cucumber/features/is_it_friday_yet.feature +36 -0
  192. smart_tests_cli-2.0.0rc1/tests/data/cucumber/record_test_json_result.json +501 -0
  193. smart_tests_cli-2.0.0rc1/tests/data/cucumber/record_test_result.json +295 -0
  194. smart_tests_cli-2.0.0rc1/tests/data/cucumber/report/TEST-features-foo-bar.xml +12 -0
  195. smart_tests_cli-2.0.0rc1/tests/data/cucumber/report/TEST-features-foo-is_it_friday_yet.xml +67 -0
  196. smart_tests_cli-2.0.0rc1/tests/data/cucumber/report/TEST-features-is_it_friday_yet.xml +67 -0
  197. smart_tests_cli-2.0.0rc1/tests/data/cucumber/report/dummy.xml +0 -0
  198. smart_tests_cli-2.0.0rc1/tests/data/cucumber/report/result.json +1992 -0
  199. smart_tests_cli-2.0.0rc1/tests/data/cypress/empty.json +1 -0
  200. smart_tests_cli-2.0.0rc1/tests/data/cypress/empty.xml +3 -0
  201. smart_tests_cli-2.0.0rc1/tests/data/cypress/record_test_result.json +75 -0
  202. smart_tests_cli-2.0.0rc1/tests/data/cypress/subset_result.json +17 -0
  203. smart_tests_cli-2.0.0rc1/tests/data/cypress/test-result.xml +13 -0
  204. smart_tests_cli-2.0.0rc1/tests/data/dotnet/record_test_result.json +113 -0
  205. smart_tests_cli-2.0.0rc1/tests/data/dotnet/test-result.xml +37 -0
  206. smart_tests_cli-2.0.0rc1/tests/data/flutter/record_test_result.json +63 -0
  207. smart_tests_cli-2.0.0rc1/tests/data/flutter/report.json +29 -0
  208. smart_tests_cli-2.0.0rc1/tests/data/git_log_ingest/sample.out +31 -0
  209. smart_tests_cli-2.0.0rc1/tests/data/go_test/record_test_result.json +179 -0
  210. smart_tests_cli-2.0.0rc1/tests/data/go_test/reportv1/reportv1.xml +22 -0
  211. smart_tests_cli-2.0.0rc1/tests/data/go_test/reportv2/reportv2.xml +16 -0
  212. smart_tests_cli-2.0.0rc1/tests/data/go_test/subset_result.json +9 -0
  213. smart_tests_cli-2.0.0rc1/tests/data/googletest/fail/output.xml +13 -0
  214. smart_tests_cli-2.0.0rc1/tests/data/googletest/fail/record_test_result.json +63 -0
  215. smart_tests_cli-2.0.0rc1/tests/data/googletest/output_a.xml +8 -0
  216. smart_tests_cli-2.0.0rc1/tests/data/googletest/output_b.xml +8 -0
  217. smart_tests_cli-2.0.0rc1/tests/data/googletest/record_test_result.json +117 -0
  218. smart_tests_cli-2.0.0rc1/tests/data/googletest/subset_result.json +21 -0
  219. smart_tests_cli-2.0.0rc1/tests/data/gradle/java/app/src/test/java/com/example/sample_app_gradle/App2Test.java +21 -0
  220. smart_tests_cli-2.0.0rc1/tests/data/gradle/java/app/src/test/java/com/example/sample_app_gradle/AppTest.java +32 -0
  221. smart_tests_cli-2.0.0rc1/tests/data/gradle/java/app/src/test/java/com/example/sample_app_gradle/sub/App3Test.java +21 -0
  222. smart_tests_cli-2.0.0rc1/tests/data/gradle/recursion/expected.json +81 -0
  223. smart_tests_cli-2.0.0rc1/tests/data/gradle/recursion/foo/bar/reports/1.xml +10 -0
  224. smart_tests_cli-2.0.0rc1/tests/data/jest/junit.xml +43 -0
  225. smart_tests_cli-2.0.0rc1/tests/data/jest/record_test_result.json +155 -0
  226. smart_tests_cli-2.0.0rc1/tests/data/jest/subset_result.json +41 -0
  227. smart_tests_cli-2.0.0rc1/tests/data/maven/createdFile_1.lst +4 -0
  228. smart_tests_cli-2.0.0rc1/tests/data/maven/createdFile_2.lst +4 -0
  229. smart_tests_cli-2.0.0rc1/tests/data/maven/java/test/src/java/com/example/sample_app_maven/App2Test.java +20 -0
  230. smart_tests_cli-2.0.0rc1/tests/data/maven/java/test/src/java/com/example/sample_app_maven/AppTest.java +14 -0
  231. smart_tests_cli-2.0.0rc1/tests/data/maven/list.lst +3 -0
  232. smart_tests_cli-2.0.0rc1/tests/data/maven/record_test_result.json +81 -0
  233. smart_tests_cli-2.0.0rc1/tests/data/maven/reports/TEST-1.xml +4 -0
  234. smart_tests_cli-2.0.0rc1/tests/data/maven/reports/TEST-2.xml +5 -0
  235. smart_tests_cli-2.0.0rc1/tests/data/maven/reports/TEST-nested.xml +4 -0
  236. smart_tests_cli-2.0.0rc1/tests/data/maven/reports/dummy.xml +4 -0
  237. smart_tests_cli-2.0.0rc1/tests/data/maven/subset_by_absolute_time_result.json +16 -0
  238. smart_tests_cli-2.0.0rc1/tests/data/maven/subset_by_confidence_result.json +16 -0
  239. smart_tests_cli-2.0.0rc1/tests/data/maven/subset_from_file_result.json +30 -0
  240. smart_tests_cli-2.0.0rc1/tests/data/maven/subset_result.json +16 -0
  241. smart_tests_cli-2.0.0rc1/tests/data/maven/subset_scan_test_compile_lst_result.json +20 -0
  242. smart_tests_cli-2.0.0rc1/tests/data/minitest/TEST-Admin_UserTest.xml +7 -0
  243. smart_tests_cli-2.0.0rc1/tests/data/minitest/TEST-Admin_UserTest_ChildlenTest.xml +5 -0
  244. smart_tests_cli-2.0.0rc1/tests/data/minitest/TEST-UserControllerTest.xml +7 -0
  245. smart_tests_cli-2.0.0rc1/tests/data/minitest/TEST-UserCopyTest.xml +7 -0
  246. smart_tests_cli-2.0.0rc1/tests/data/minitest/TEST-UserTest.xml +5 -0
  247. smart_tests_cli-2.0.0rc1/tests/data/minitest/record_test_result.json +152 -0
  248. smart_tests_cli-2.0.0rc1/tests/data/minitest/record_test_result_chunk1.json +90 -0
  249. smart_tests_cli-2.0.0rc1/tests/data/minitest/record_test_result_chunk2.json +53 -0
  250. smart_tests_cli-2.0.0rc1/tests/data/minitest/subset_result.json +10 -0
  251. smart_tests_cli-2.0.0rc1/tests/data/minitest/test/example_test.rb +1 -0
  252. smart_tests_cli-2.0.0rc1/tests/data/nunit/list.xml +39 -0
  253. smart_tests_cli-2.0.0rc1/tests/data/nunit/nunit-reporter-bug-with-nested-type.json +42 -0
  254. smart_tests_cli-2.0.0rc1/tests/data/nunit/nunit-reporter-bug-with-nested-type.xml +25 -0
  255. smart_tests_cli-2.0.0rc1/tests/data/nunit/output-linux.xml +67 -0
  256. smart_tests_cli-2.0.0rc1/tests/data/nunit/output-windows.xml +67 -0
  257. smart_tests_cli-2.0.0rc1/tests/data/nunit/record_test_result-linux.json +112 -0
  258. smart_tests_cli-2.0.0rc1/tests/data/nunit/record_test_result-windows.json +112 -0
  259. smart_tests_cli-2.0.0rc1/tests/data/nunit/src/.gitignore +3 -0
  260. smart_tests_cli-2.0.0rc1/tests/data/nunit/src/Program.cs +12 -0
  261. smart_tests_cli-2.0.0rc1/tests/data/nunit/src/README.md +10 -0
  262. smart_tests_cli-2.0.0rc1/tests/data/nunit/src/Test.cs +74 -0
  263. smart_tests_cli-2.0.0rc1/tests/data/nunit/src/calc.csproj +14 -0
  264. smart_tests_cli-2.0.0rc1/tests/data/nunit/subset_result.json +50 -0
  265. smart_tests_cli-2.0.0rc1/tests/data/playwright/record_test_result.json +1683 -0
  266. smart_tests_cli-2.0.0rc1/tests/data/playwright/record_test_result_with_json.json +2409 -0
  267. smart_tests_cli-2.0.0rc1/tests/data/playwright/report.json +3618 -0
  268. smart_tests_cli-2.0.0rc1/tests/data/playwright/report.xml +581 -0
  269. smart_tests_cli-2.0.0rc1/tests/data/prove/record_test_result.json +135 -0
  270. smart_tests_cli-2.0.0rc1/tests/data/prove/report.xml +65 -0
  271. smart_tests_cli-2.0.0rc1/tests/data/pytest/pytest.ini +8 -0
  272. smart_tests_cli-2.0.0rc1/tests/data/pytest/record_test_result.json +233 -0
  273. smart_tests_cli-2.0.0rc1/tests/data/pytest/record_test_result_json.json +163 -0
  274. smart_tests_cli-2.0.0rc1/tests/data/pytest/report.json +29 -0
  275. smart_tests_cli-2.0.0rc1/tests/data/pytest/report.xml +120 -0
  276. smart_tests_cli-2.0.0rc1/tests/data/pytest/subset_result.json +133 -0
  277. smart_tests_cli-2.0.0rc1/tests/data/pytest/tests/conftest.py +6 -0
  278. smart_tests_cli-2.0.0rc1/tests/data/pytest/tests/fooo/__init__.py +0 -0
  279. smart_tests_cli-2.0.0rc1/tests/data/pytest/tests/fooo/filenameonly_test.py +2 -0
  280. smart_tests_cli-2.0.0rc1/tests/data/pytest/tests/fooo/func4_test.py +2 -0
  281. smart_tests_cli-2.0.0rc1/tests/data/pytest/tests/funcs3_test.py +6 -0
  282. smart_tests_cli-2.0.0rc1/tests/data/pytest/tests/test_funcs1.py +20 -0
  283. smart_tests_cli-2.0.0rc1/tests/data/pytest/tests/test_funcs2.py +11 -0
  284. smart_tests_cli-2.0.0rc1/tests/data/robot/dryrun.xml +129 -0
  285. smart_tests_cli-2.0.0rc1/tests/data/robot/output.xml +131 -0
  286. smart_tests_cli-2.0.0rc1/tests/data/robot/record_test_executed_only_one_file_result.json +63 -0
  287. smart_tests_cli-2.0.0rc1/tests/data/robot/record_test_result.json +117 -0
  288. smart_tests_cli-2.0.0rc1/tests/data/robot/single-output.xml +56 -0
  289. smart_tests_cli-2.0.0rc1/tests/data/robot/subset_result.json +33 -0
  290. smart_tests_cli-2.0.0rc1/tests/data/rspec/record_test_result.json +361 -0
  291. smart_tests_cli-2.0.0rc1/tests/data/rspec/rspec.xml +22 -0
  292. smart_tests_cli-2.0.0rc1/tests/data/vitest/record_test_result.json +99 -0
  293. smart_tests_cli-2.0.0rc1/tests/data/vitest/report.xml +55 -0
  294. smart_tests_cli-2.0.0rc1/tests/data/xctest/junit.xml +24 -0
  295. smart_tests_cli-2.0.0rc1/tests/data/xctest/record_test_result.json +207 -0
  296. smart_tests_cli-2.0.0rc1/tests/data/xctest/subset_result.json +10 -0
  297. smart_tests_cli-2.0.0rc1/tests/helper.py +9 -0
  298. smart_tests_cli-2.0.0rc1/tests/plugins/foo.py +21 -0
  299. smart_tests_cli-2.0.0rc1/tests/test_cli_test_case.py +243 -0
  300. smart_tests_cli-2.0.0rc1/tests/test_plugin.py +54 -0
  301. smart_tests_cli-2.0.0rc1/tests/test_runners/__init__.py +0 -0
  302. smart_tests_cli-2.0.0rc1/tests/test_runners/test_adb.py +76 -0
  303. smart_tests_cli-2.0.0rc1/tests/test_runners/test_ant.py +47 -0
  304. smart_tests_cli-2.0.0rc1/tests/test_runners/test_bazel.py +158 -0
  305. smart_tests_cli-2.0.0rc1/tests/test_runners/test_behave.py +56 -0
  306. smart_tests_cli-2.0.0rc1/tests/test_runners/test_ctest.py +117 -0
  307. smart_tests_cli-2.0.0rc1/tests/test_runners/test_cts.py +116 -0
  308. smart_tests_cli-2.0.0rc1/tests/test_runners/test_cucumber.py +73 -0
  309. smart_tests_cli-2.0.0rc1/tests/test_runners/test_cypress.py +81 -0
  310. smart_tests_cli-2.0.0rc1/tests/test_runners/test_dotnet.py +198 -0
  311. smart_tests_cli-2.0.0rc1/tests/test_runners/test_go_test.py +76 -0
  312. smart_tests_cli-2.0.0rc1/tests/test_runners/test_googletest.py +100 -0
  313. smart_tests_cli-2.0.0rc1/tests/test_runners/test_gradle.py +331 -0
  314. smart_tests_cli-2.0.0rc1/tests/test_runners/test_jest.py +114 -0
  315. smart_tests_cli-2.0.0rc1/tests/test_runners/test_maven.py +236 -0
  316. smart_tests_cli-2.0.0rc1/tests/test_runners/test_minitest.py +171 -0
  317. smart_tests_cli-2.0.0rc1/tests/test_runners/test_nunit.py +111 -0
  318. smart_tests_cli-2.0.0rc1/tests/test_runners/test_playwright.py +101 -0
  319. smart_tests_cli-2.0.0rc1/tests/test_runners/test_prove.py +49 -0
  320. smart_tests_cli-2.0.0rc1/tests/test_runners/test_pytest.py +113 -0
  321. smart_tests_cli-2.0.0rc1/tests/test_runners/test_raw.py +401 -0
  322. smart_tests_cli-2.0.0rc1/tests/test_runners/test_robot.py +67 -0
  323. smart_tests_cli-2.0.0rc1/tests/test_runners/test_rspec.py +29 -0
  324. smart_tests_cli-2.0.0rc1/tests/test_runners/test_vitest.py +28 -0
  325. smart_tests_cli-2.0.0rc1/tests/test_runners/test_xctest.py +77 -0
  326. smart_tests_cli-2.0.0rc1/tests/test_testpath.py +140 -0
  327. smart_tests_cli-2.0.0rc1/tests/test_version.py +14 -0
  328. smart_tests_cli-2.0.0rc1/tests/utils/__init__.py +0 -0
  329. smart_tests_cli-2.0.0rc1/tests/utils/test_authentication.py +112 -0
  330. smart_tests_cli-2.0.0rc1/tests/utils/test_file_name_pattern.py +27 -0
  331. smart_tests_cli-2.0.0rc1/tests/utils/test_git_log_parser.py +155 -0
  332. smart_tests_cli-2.0.0rc1/tests/utils/test_glob.py +66 -0
  333. smart_tests_cli-2.0.0rc1/tests/utils/test_gzipgen.py +13 -0
  334. smart_tests_cli-2.0.0rc1/tests/utils/test_http_client.py +51 -0
  335. smart_tests_cli-2.0.0rc1/tests/utils/test_link.py +46 -0
  336. smart_tests_cli-2.0.0rc1/tests/utils/test_logger.py +45 -0
  337. smart_tests_cli-2.0.0rc1/tests/utils/test_typer.py +59 -0
  338. smart_tests_cli-2.0.0rc1/uv.lock +573 -0
@@ -0,0 +1,4 @@
1
+ build --java_language_version=8
2
+ build --java_runtime_version=remotejdk_11
3
+ build --tool_java_language_version=11
4
+ build --tool_java_runtime_version=remotejdk_11
@@ -0,0 +1 @@
1
+ 7.5.0
@@ -0,0 +1,11 @@
1
+ # Capturing the part of the team-wide coding conventions
2
+ # see https://editorconfig.org/
3
+ root = true
4
+
5
+ [*]
6
+ insert_final_newline = true
7
+ charset=utf-8
8
+ indent_style=space
9
+
10
+ [*.java]
11
+ indent_size = 4
@@ -0,0 +1,4 @@
1
+ changelog:
2
+ exclude:
3
+ labels:
4
+ - tagpr
@@ -0,0 +1,34 @@
1
+ name: Bazel test
2
+ on:
3
+ push:
4
+ branches:
5
+ - main
6
+ paths:
7
+ - 'WORKSPACE'
8
+ - 'src/**'
9
+ - '!src/**.md'
10
+ pull_request:
11
+ paths:
12
+ - 'WORKSPACE'
13
+ - 'src/**'
14
+ - '!src/**.md'
15
+ jobs:
16
+ test:
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
20
+ - name: Set up JDK 8
21
+ uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
22
+ with:
23
+ distribution: temurin
24
+ java-version: '8'
25
+ - name: Setup Bazel
26
+ uses: bazelbuild/setup-bazelisk@b39c379c82683a5f25d34f0d062761f62693e0b2 # v3.0.0
27
+ - name: Cache Bazel outputs
28
+ uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
29
+ with:
30
+ path: "~/.cache/bazel"
31
+ key: bazel
32
+ - name: Run Bazel test
33
+ run: |
34
+ bazel test //...
@@ -0,0 +1,133 @@
1
+ name: e2e
2
+
3
+ on:
4
+ push:
5
+ branches: [main, smart-tests] # smart-tests branch temporarily added for Smart Tests CLI development
6
+ workflow_dispatch:
7
+
8
+
9
+ env:
10
+ SMART_TESTS_DEBUG: 1
11
+ SMART_TESTS_REPORT_ERROR: 1
12
+ # The WORKSPACE file is disabled by default in Bazel 8.
13
+ # As a workaround, we configure the old version.
14
+ USE_BAZEL_VERSION: "7.x"
15
+
16
+ jobs:
17
+ tests:
18
+ runs-on: ubuntu-22.04
19
+ steps:
20
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
21
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
22
+ with:
23
+ repository: launchableinc/examples
24
+ path: examples
25
+ - name: Set up JDK 1.8
26
+ uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4
27
+ with:
28
+ java-version: 8
29
+ distribution: 'temurin'
30
+ - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
31
+ with:
32
+ go-version: 1.24
33
+ - name: Install uv
34
+ uses: astral-sh/setup-uv@caf0cab7a618c569241d31dcd442f54681755d39 # v3
35
+ with:
36
+ enable-cache: true
37
+ cache-dependency-glob: "uv.lock"
38
+ - name: Install dependencies
39
+ run: uv sync --dev && uv tool install .
40
+ # bazel
41
+ - name: Install Bazelisk
42
+ run: |
43
+ go install github.com/bazelbuild/bazelisk@latest
44
+ - name: "bazel: verify"
45
+ run: "smart-tests verify"
46
+ env:
47
+ SMART_TESTS_TOKEN: ${{ secrets.LAUNCHABLE_TOKEN_BAZEL }}
48
+ - name: "bazel: Record build"
49
+ run: 'smart-tests record build --build "$GITHUB_RUN_ID" --branch "$GITHUB_REF_NAME" --source main=../.. --source cli=../../..'
50
+ env:
51
+ SMART_TESTS_TOKEN: ${{ secrets.LAUNCHABLE_TOKEN_BAZEL }}
52
+ working-directory: examples/bazel/java
53
+ - name: "bazel: Record session"
54
+ run: 'smart-tests record session --build "$GITHUB_RUN_ID" --session "$GITHUB_RUN_NUMBER-bazel" --test-suite "bazel"'
55
+ env:
56
+ SMART_TESTS_TOKEN: ${{ secrets.LAUNCHABLE_TOKEN_BAZEL }}
57
+ working-directory: examples/bazel/java
58
+ - name: "bazel: Subset"
59
+ run: bazelisk query 'tests(//...)' | smart-tests subset bazel --build "$GITHUB_RUN_ID" --session "$GITHUB_RUN_NUMBER-bazel" --target 30% > subset.txt
60
+ env:
61
+ SMART_TESTS_TOKEN: ${{ secrets.LAUNCHABLE_TOKEN_BAZEL }}
62
+ working-directory: examples/bazel/java
63
+ - name: "bazel: Run test"
64
+ run: bazelisk test $(cat subset.txt)
65
+ working-directory: examples/bazel/java
66
+ - name: "bazel: Record test results"
67
+ run: smart-tests record test bazel --build "$GITHUB_RUN_ID" --session "$GITHUB_RUN_NUMBER-bazel" .
68
+ if: always()
69
+ env:
70
+ SMART_TESTS_TOKEN: ${{ secrets.LAUNCHABLE_TOKEN_BAZEL }}
71
+ working-directory: examples/bazel/java
72
+ # go
73
+ - name: Install go-junit-report
74
+ run: |
75
+ go install github.com/jstemmer/go-junit-report@latest
76
+ working-directory: examples/go
77
+ - name: "go: verify"
78
+ run: "smart-tests verify"
79
+ env:
80
+ SMART_TESTS_TOKEN: ${{ secrets.LAUNCHABLE_TOKEN_GO }}
81
+ - name: "go: Record build"
82
+ run: 'smart-tests record build --build "$GITHUB_RUN_ID" --branch "$GITHUB_REF_NAME" --source main=.. --source cli=../..'
83
+ env:
84
+ SMART_TESTS_TOKEN: ${{ secrets.LAUNCHABLE_TOKEN_GO }}
85
+ working-directory: examples/go
86
+ - name: "go: Record session"
87
+ run: 'smart-tests record session --build "$GITHUB_RUN_ID" --session "$GITHUB_RUN_NUMBER-go" --test-suite "go-test"'
88
+ env:
89
+ SMART_TESTS_TOKEN: ${{ secrets.LAUNCHABLE_TOKEN_GO }}
90
+ working-directory: examples/go
91
+ - name: "go: Subset"
92
+ run: go test -list="Test|Example" ./... | smart-tests subset go-test --build "$GITHUB_RUN_ID" --session "$GITHUB_RUN_NUMBER-go" --confidence 80% > smart-tests-subset.txt
93
+ env:
94
+ SMART_TESTS_TOKEN: ${{ secrets.LAUNCHABLE_TOKEN_GO }}
95
+ working-directory: examples/go
96
+ - name: "go: Run test"
97
+ run: go test -run $(cat smart-tests-subset.txt) ./... -v 2>&1 | go-junit-report -set-exit-code > report.xml
98
+ working-directory: examples/go
99
+ - name: "go: Record test results"
100
+ run: smart-tests record test go-test --build "$GITHUB_RUN_ID" --session "$GITHUB_RUN_NUMBER-go" report.xml
101
+ if: always()
102
+ env:
103
+ SMART_TESTS_TOKEN: ${{ secrets.LAUNCHABLE_TOKEN_GO }}
104
+ working-directory: examples/go
105
+ # gradle
106
+ - name: "gradle: verify"
107
+ run: "smart-tests verify"
108
+ env:
109
+ SMART_TESTS_TOKEN: ${{ secrets.LAUNCHABLE_TOKEN_GRADLE }}
110
+ - name: "gradle: Record build"
111
+ run: 'smart-tests record build --build "$GITHUB_RUN_ID" --branch "$GITHUB_REF_NAME" --source main=.. --source cli=../..'
112
+ env:
113
+ SMART_TESTS_TOKEN: ${{ secrets.LAUNCHABLE_TOKEN_GRADLE }}
114
+ working-directory: examples/gradle
115
+ - name: "gradle: Record session"
116
+ run: 'smart-tests record session --build "$GITHUB_RUN_ID" --session "$GITHUB_RUN_NUMBER-gradle" --test-suite "gradle"'
117
+ env:
118
+ SMART_TESTS_TOKEN: ${{ secrets.LAUNCHABLE_TOKEN_GRADLE }}
119
+ working-directory: examples/gradle
120
+ - name: "gradle: Subset"
121
+ run: smart-tests subset gradle --build "$GITHUB_RUN_ID" --session "$GITHUB_RUN_NUMBER-gradle" --target 80% src/test/java > smart-tests-subset.txt
122
+ env:
123
+ SMART_TESTS_TOKEN: ${{ secrets.LAUNCHABLE_TOKEN_GRADLE }}
124
+ working-directory: examples/gradle
125
+ - name: "gradle: Run test"
126
+ run: ./gradlew test $(cat smart-tests-subset.txt)
127
+ working-directory: examples/gradle
128
+ - name: "gradle: Record test results"
129
+ run: smart-tests record test gradle --build "$GITHUB_RUN_ID" --session "$GITHUB_RUN_NUMBER-gradle" build/test-results/test
130
+ if: always()
131
+ env:
132
+ SMART_TESTS_TOKEN: ${{ secrets.LAUNCHABLE_TOKEN_GRADLE }}
133
+ working-directory: examples/gradle
@@ -0,0 +1,95 @@
1
+ # Publish workflow for the Smart Tests CLI
2
+ # Builds and publishes packages to PyPI and Docker Hub
3
+
4
+ name: Publish
5
+
6
+ on:
7
+ workflow_dispatch:
8
+ push:
9
+ branches:
10
+ - main
11
+
12
+ env:
13
+ IMAGE_NAME: cloudbees/smart-tests
14
+
15
+ jobs:
16
+ tagpr:
17
+ permissions:
18
+ actions: write
19
+ contents: write
20
+ pull-requests: write
21
+ runs-on: ubuntu-latest
22
+ outputs:
23
+ tag: ${{ steps.run-tagpr.outputs.tag }}
24
+ steps:
25
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
26
+ - id: run-tagpr
27
+ uses: Songmu/tagpr@e89d37247ca73d3e5620bf074a53fbd5b39e66b0 # v1.5.1
28
+ env:
29
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30
+
31
+ pypi:
32
+ needs: tagpr
33
+ if: needs.tagpr.outputs.tag != '' || github.event_name == 'workflow_dispatch'
34
+
35
+ runs-on: ubuntu-22.04
36
+
37
+ steps:
38
+ - uses: actions/checkout@v4
39
+ with:
40
+ fetch-depth: 0
41
+ - name: Install uv
42
+ uses: astral-sh/setup-uv@v3
43
+
44
+ - name: Build package
45
+ run: uv build
46
+ - name: Publish to PyPI
47
+ run: uv publish --token ${{ secrets.SMART_TESTS_PYPI_API_TOKEN }}
48
+ - name: Actions for Discord
49
+ uses: Ilshidur/action-discord@0.3.2
50
+ env:
51
+ DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
52
+ with:
53
+ args: 'Smart Tests CLI ${{ needs.tagpr.outputs.tag }} is released! https://github.com/launchableinc/cli/releases/tag/${{ needs.tagpr.outputs.tag }}'
54
+
55
+ docker:
56
+ name: Push Docker image to Docker Hub
57
+ needs: tagpr
58
+ if: needs.tagpr.outputs.tag != '' || github.event_name == 'workflow_dispatch'
59
+
60
+ runs-on: ubuntu-22.04
61
+
62
+ permissions:
63
+ packages: write
64
+ contents: read
65
+ attestations: write
66
+ id-token: write
67
+ steps:
68
+ - name: Check out the repo
69
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
70
+
71
+ - name: Log in to Docker Hub
72
+ uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
73
+ with:
74
+ username: ${{ secrets.DOCKER_USERNAME }}
75
+ password: ${{ secrets.DOCKER_PASSWORD }}
76
+
77
+ - name: Set up Docker Buildx
78
+ uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
79
+
80
+ - name: Build and push Docker image
81
+ id: push
82
+ uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
83
+ with:
84
+ context: .
85
+ file: ./Dockerfile
86
+ platforms: linux/amd64,linux/arm64
87
+ push: true
88
+ tags: ${{ env.IMAGE_NAME }}:${{ needs.tagpr.outputs.tag }}
89
+
90
+ - name: Generate artifact attestation
91
+ uses: actions/attest-build-provenance@db473fddc028af60658334401dc6fa3ffd8669fd # v2.3.0
92
+ with:
93
+ subject-name: index.docker.io/${{ env.IMAGE_NAME }}
94
+ subject-digest: ${{ steps.push.outputs.digest }}
95
+ push-to-registry: true
@@ -0,0 +1,95 @@
1
+ # Test workflow for the Smart Tests CLI
2
+ # Runs tests, linting, type checking, and build verification
3
+
4
+ name: Test
5
+
6
+ on:
7
+ workflow_dispatch:
8
+ push:
9
+ branches: [ main ]
10
+ paths-ignore:
11
+ - 'WORKSPACE'
12
+ - 'src/**'
13
+ pull_request:
14
+ paths-ignore:
15
+ - 'WORKSPACE'
16
+ - 'src/**'
17
+ schedule:
18
+ # This job runs at 00:00 JST every day.
19
+ - cron: '0 9 * * *'
20
+
21
+ env:
22
+ SMART_TESTS_ORGANIZATION: "launchableinc"
23
+ SMART_TESTS_WORKSPACE: "cli"
24
+ GITHUB_PULL_REQUEST_URL: ${{ github.event.pull_request.html_url }}
25
+ GITHUB_PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
26
+
27
+ permissions:
28
+ id-token: write
29
+ contents: read
30
+
31
+ jobs:
32
+ build:
33
+ runs-on: ${{ matrix.os }}
34
+ strategy:
35
+ matrix:
36
+ os: [ubuntu-22.04, windows-latest]
37
+
38
+ steps:
39
+ - uses: actions/checkout@v4
40
+ with:
41
+ fetch-depth: 0
42
+
43
+ - name: Install uv
44
+ uses: astral-sh/setup-uv@caf0cab7a618c569241d31dcd442f54681755d39 # v3
45
+ with:
46
+ enable-cache: true
47
+ cache-dependency-glob: "uv.lock"
48
+
49
+ - name: Set up JDK 1.8
50
+ uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
51
+ with:
52
+ java-version: 8
53
+ distribution: 'temurin'
54
+
55
+ - name: Install dependencies
56
+ run: uv sync --dev
57
+
58
+ - name: Test package build
59
+ run: uv build
60
+
61
+ - name: Type check
62
+ run: uv run poe type
63
+
64
+ - name: Lint with flake8
65
+ run: uv run poe lint
66
+ - name: Pull request validation
67
+ run: |
68
+ # Install Smart Tests CLI from this repo's code as a global tool
69
+ uv tool install .
70
+
71
+ set -x
72
+
73
+ smart-tests verify
74
+
75
+ # Tell Smart Tests about the build you are producing and testing
76
+ smart-tests record build --build ${GITHUB_RUN_ID} --branch ${GITHUB_REF_NAME}
77
+
78
+ smart-tests record session --build ${GITHUB_RUN_ID} --session ${GITHUB_RUN_NUMBER}-${{ github.run_attempt }}-${{ matrix.os }} --test-suite 'python-unittest' --flavor os=${{ matrix.os }} --flavor python=$(cat .python-version)
79
+
80
+ # Find 25% of the relevant tests to run for this change
81
+ find tests -name test_*.py | grep -v tests/data | smart-tests subset file --build ${GITHUB_RUN_ID} --session ${GITHUB_RUN_NUMBER}-${{ github.run_attempt }}-${{ matrix.os }} --target 25% --rest smart-tests-remainder.txt > subset.txt
82
+
83
+ function record() {
84
+ # Record test results
85
+ SMART_TESTS_SLACK_NOTIFICATION=true smart-tests record test file --build ${GITHUB_RUN_ID} --session ${GITHUB_RUN_NUMBER}-${{ github.run_attempt }}-${{ matrix.os }} test-results/*.xml
86
+ }
87
+
88
+ trap record EXIT
89
+
90
+ # Test subset of tests
91
+ uv run poe test-xml $(tr '\r\n' '\n' < subset.txt)
92
+
93
+ # Test rest of tests
94
+ uv run poe test-xml $(tr '\r\n' '\n' < smart-tests-remainder.txt)
95
+ shell: bash
@@ -0,0 +1,40 @@
1
+ name: Update maven_install.json
2
+ on:
3
+ pull_request:
4
+ paths:
5
+ - 'WORKSPACE'
6
+ jobs:
7
+ update:
8
+ runs-on: ubuntu-latest
9
+ steps:
10
+ - uses: actions/checkout@v4
11
+ with:
12
+ ref: ${{ github.event.pull_request.head.ref }}
13
+ # Bot token is needed to ensure that git-push triggers relevant workflows
14
+ # See https://github.com/orgs/community/discussions/27146
15
+ token: ${{ secrets.LAUNCHABLEINC_CI_GITHUB_TOKEN }}
16
+ - name: Set up JDK 17
17
+ uses: actions/setup-java@v4
18
+ with:
19
+ distribution: temurin
20
+ java-version: '17'
21
+ - name: Setup Bazel
22
+ uses: bazelbuild/setup-bazelisk@b39c379c82683a5f25d34f0d062761f62693e0b2 # v3.0.0
23
+ - name: Cache Bazel outputs
24
+ uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
25
+ with:
26
+ path: "~/.cache/bazel"
27
+ key: bazel
28
+ - name: Update maven_install.json
29
+ run: |
30
+ bazel run @unpinned_maven//:pin
31
+ - name: Commit updated files
32
+ run: |
33
+ if ! git diff --exit-code --quiet
34
+ then
35
+ git add src/maven_install.json
36
+ git config --local user.email "nobody@launchableinc.com"
37
+ git config --local user.name "File Update GitHub Workflow"
38
+ git commit -m "Update maven_install.json"
39
+ git push
40
+ fi
@@ -0,0 +1,147 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
98
+ __pypackages__/
99
+
100
+ # Celery stuff
101
+ celerybeat-schedule
102
+ celerybeat.pid
103
+
104
+ # SageMath parsed files
105
+ *.sage.py
106
+
107
+ # Environments
108
+ .env
109
+ .venv
110
+ env/
111
+ venv/
112
+ ENV/
113
+ env.bak/
114
+ venv.bak/
115
+
116
+ # Spyder project settings
117
+ .spyderproject
118
+ .spyproject
119
+
120
+ # Rope project settings
121
+ .ropeproject
122
+
123
+ # mkdocs documentation
124
+ /site
125
+
126
+ # mypy
127
+ .mypy_cache/
128
+ .dmypy.json
129
+ dmypy.json
130
+
131
+ # Pyre type checker
132
+ .pyre/
133
+
134
+ # pytype static type analyzer
135
+ .pytype/
136
+
137
+ # Cython debug symbols
138
+ cython_debug/
139
+
140
+ # Targetting multiple Python versions
141
+ Pipfile.lock
142
+
143
+ .vscode/
144
+ bazel-*
145
+
146
+ .DS_Store
147
+ .idea/*
@@ -0,0 +1,39 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v4.0.1
4
+ hooks:
5
+ - id: end-of-file-fixer
6
+
7
+ - repo: https://github.com/PyCQA/flake8
8
+ rev: 7.0.0
9
+ hooks:
10
+ - id: flake8
11
+ args:
12
+ - --ignore=C901,E741,E126
13
+ - --max-line-length=130
14
+ - smart_tests/
15
+ - tests/
16
+
17
+ - repo: https://github.com/pycqa/isort
18
+ rev: 5.11.5
19
+ hooks:
20
+ - id: isort
21
+ args:
22
+ - "-l 130"
23
+ - --balanced
24
+ - smart_tests/*.py
25
+ - tests/*.py
26
+
27
+ - repo: https://github.com/hhatto/autopep8
28
+ rev: v2.3.1
29
+ hooks:
30
+ - id: autopep8
31
+ args:
32
+ - --in-place
33
+ - --recursive
34
+ - --aggressive
35
+ - --experimental
36
+ - --max-line-length=130
37
+ - --ignore=E126
38
+ - smart_tests/
39
+ - tests/
@@ -0,0 +1 @@
1
+ 3.13
@@ -0,0 +1,43 @@
1
+ # config file for the tagpr in git config format
2
+ # The tagpr generates the initial configuration, which you can rewrite to suit your environment.
3
+ # CONFIGURATIONS:
4
+ # tagpr.releaseBranch
5
+ # Generally, it is "main." It is the branch for releases. The tagpr tracks this branch,
6
+ # creates or updates a pull request as a release candidate, or tags when they are merged.
7
+ #
8
+ # tagpr.versionFile
9
+ # Versioning file containing the semantic version needed to be updated at release.
10
+ # It will be synchronized with the "git tag".
11
+ # Often this is a meta-information file such as gemspec, setup.cfg, package.json, etc.
12
+ # Sometimes the source code file, such as version.go or Bar.pm, is used.
13
+ # If you do not want to use versioning files but only git tags, specify the "-" string here.
14
+ # You can specify multiple version files by comma separated strings.
15
+ #
16
+ # tagpr.vPrefix
17
+ # Flag whether or not v-prefix is added to semver when git tagging. (e.g. v1.2.3 if true)
18
+ # This is only a tagging convention, not how it is described in the version file.
19
+ #
20
+ # tagpr.changelog (Optional)
21
+ # Flag whether or not changelog is added or changed during the release.
22
+ #
23
+ # tagpr.command (Optional)
24
+ # Command to change files just before release.
25
+ #
26
+ # tagpr.template (Optional)
27
+ # Pull request template in go template format
28
+ #
29
+ # tagpr.release (Optional)
30
+ # GitHub Release creation behavior after tagging [true, draft, false]
31
+ # If this value is not set, the release is to be created.
32
+ #
33
+ # tagpr.majorLabels (Optional)
34
+ # Label of major update targets. Default is [major]
35
+ #
36
+ # tagpr.minorLabels (Optional)
37
+ # Label of minor update targets. Default is [minor]
38
+ #
39
+ [tagpr]
40
+ vPrefix = true
41
+ releaseBranch = main
42
+ versionFile = -
43
+ changelog = false
@@ -0,0 +1,19 @@
1
+ # Coding style
2
+ Code should follow [pep8](https://www.python.org/dev/peps/pep-0008/). To check coding style, this repo using `[flake8](https://flake8.pycqa.org/)` on Github Actions.
3
+ `[autopep8](https://pypi.org/project/autopep8/)` might help you fixing your code's style.
4
+
5
+ # Development
6
+ You can use Python's `-m` option to launch module directly.
7
+ ```shell
8
+ python3 -m smart_tests record commit
9
+ ```
10
+
11
+ # Design Philosophy
12
+ - **Dependencies**: Smart Tests needs to run with varying environments of users. So when we need to
13
+ reduce dependencies to other packages or tools installed on the system. For example, Python packages
14
+ we depend on and their version constraints might conflict with what other Python packages specifies.
15
+ Some libraries have native components, which need to be built during `pip install` and that adds to
16
+ the burden, too.
17
+ - **Extensibility**: Test runners people use are all over the map. To provide 1st class support for those
18
+ while keeping the code DRY, CLI has two layers. The core layer that defines a properly abstracted
19
+ generic logic, and tool specific "integration" layers that glue the core layer and different tools.