gha-utils 4.16.1__py3-none-any.whl → 4.16.3__py3-none-any.whl

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 gha-utils might be problematic. Click here for more details.

gha_utils/__init__.py CHANGED
@@ -17,4 +17,4 @@
17
17
 
18
18
  from __future__ import annotations
19
19
 
20
- __version__ = "4.16.1"
20
+ __version__ = "4.16.3"
gha_utils/cli.py CHANGED
@@ -338,6 +338,11 @@ def mailmap_sync(ctx, source, create_if_missing, destination_mailmap):
338
338
  help="Set the default timeout for each CLI call, if not specified in the "
339
339
  "test plan.",
340
340
  )
341
+ @option(
342
+ "--show-trace-on-error/--hide-trace-on-error",
343
+ default=True,
344
+ help="Show execution trace of failed tests.",
345
+ )
341
346
  @option(
342
347
  "--stats/--no-stats",
343
348
  is_flag=True,
@@ -352,6 +357,7 @@ def test_plan(
352
357
  skip_platform: tuple[str, ...] | None,
353
358
  exit_on_error: bool,
354
359
  timeout: float | None,
360
+ show_trace_on_error: bool,
355
361
  stats: bool,
356
362
  ) -> None:
357
363
  # Load test plan from workflow input, or use a default one.
@@ -399,6 +405,8 @@ def test_plan(
399
405
  except Exception as ex:
400
406
  counter["failed"] += 1
401
407
  logging.error(f"Test {test_name} failed: {ex}")
408
+ if show_trace_on_error:
409
+ echo(test_case.execution_trace or "No execution trace available.")
402
410
  if exit_on_error:
403
411
  logging.debug("Don't continue testing, a failed test was found.")
404
412
  sys.exit(1)
gha_utils/test_plan.py CHANGED
@@ -64,6 +64,9 @@ class CLITestCase:
64
64
  stdout_regex_fullmatch: re.Pattern | str | None = None
65
65
  stderr_regex_fullmatch: re.Pattern | str | None = None
66
66
 
67
+ execution_trace: str | None = None
68
+ """User-friendly rendering of the CLI command execution and its output."""
69
+
67
70
  def __post_init__(self) -> None:
68
71
  """Normalize all fields."""
69
72
  for field_id, field_data in asdict(self).items():
@@ -208,7 +211,9 @@ class CLITestCase:
208
211
  f"CLI timed out after {self.timeout} seconds: {' '.join(clean_args)}"
209
212
  )
210
213
 
211
- for line in render_cli_run(clean_args, result).splitlines():
214
+ # Execution has been completed, save the output for user's inspection.
215
+ self.execution_trace = render_cli_run(clean_args, result)
216
+ for line in self.execution_trace.splitlines():
212
217
  logging.info(line)
213
218
 
214
219
  for field_id, field_data in asdict(self).items():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gha-utils
3
- Version: 4.16.1
3
+ Version: 4.16.3
4
4
  Summary: ⚙️ CLI helpers for GitHub Actions + reuseable workflows
5
5
  Author-email: Kevin Deldycke <kevin@deldycke.com>
6
6
  Project-URL: Homepage, https://github.com/kdeldycke/workflows
@@ -141,10 +141,10 @@ That's the best way to get started with `gha-utils` and experiment with it.
141
141
 
142
142
  To ease deployment, standalone executables of `gha-utils`'s latest version are available as direct downloads for several platforms and architectures:
143
143
 
144
- | Platform | `x86_64` | `arm64` |
145
- | ----------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
146
- | **Linux** | [Download `gha-utils-linux-x64.bin`](https://github.com/kdeldycke/workflows/releases/latest/download/gha-utils-linux-x64.bin) | [Download `gha-utils-linux-arm64.bin`](https://github.com/kdeldycke/workflows/releases/latest/download/gha-utils-linux-arm64.bin) |
147
- | **macOS** | [Download `gha-utils-macos-x64.bin`](https://github.com/kdeldycke/workflows/releases/latest/download/gha-utils-macos-x64.bin) | [Download `gha-utils-macos-arm64.bin`](https://github.com/kdeldycke/workflows/releases/latest/download/gha-utils-macos-arm64.bin) |
144
+ | Platform | `x86_64` | `arm64` |
145
+ | ----------- | --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
146
+ | **Linux** | [Download `gha-utils-linux-x64.bin`](https://github.com/kdeldycke/workflows/releases/latest/download/gha-utils-linux-x64.bin) | [Download `gha-utils-linux-arm64.bin`](https://github.com/kdeldycke/workflows/releases/latest/download/gha-utils-linux-arm64.bin) |
147
+ | **macOS** | [Download `gha-utils-macos-x64.bin`](https://github.com/kdeldycke/workflows/releases/latest/download/gha-utils-macos-x64.bin) | [Download `gha-utils-macos-arm64.bin`](https://github.com/kdeldycke/workflows/releases/latest/download/gha-utils-macos-arm64.bin) |
148
148
  | **Windows** | [Download `gha-utils-windows-x64.exe`](https://github.com/kdeldycke/workflows/releases/latest/download/gha-utils-windows-x64.exe) | [Download `gha-utils-windows-arm64.exe`](https://github.com/kdeldycke/workflows/releases/latest/download/gha-utils-windows-arm64.exe) |
149
149
 
150
150
  ABI targets:
@@ -0,0 +1,14 @@
1
+ gha_utils/__init__.py,sha256=Olk56PTU_su3nBOHRdC7AIbTBGgWFgFjLl9sUJQJSU8,866
2
+ gha_utils/__main__.py,sha256=Dck9BjpLXmIRS83k0mghAMcYVYiMiFLltQdfRuMSP_Q,1703
3
+ gha_utils/changelog.py,sha256=JR7iQrWjLoIOpVNe6iXQSyEii82_hM_zrYpR7QO_Uxo,5777
4
+ gha_utils/cli.py,sha256=AMCeT5mo6zKZ0__RgNu9veuoIDApgmD7ZalnEpM0I2o,14246
5
+ gha_utils/mailmap.py,sha256=naUqJYJnE3fLTjju1nd6WMm7ODiSaI2SHuJxRtmaFWs,6269
6
+ gha_utils/matrix.py,sha256=_afJD0K-xZLNxwykVnUhD0Gj9cdO0Z43g3VHa-q_tkI,11941
7
+ gha_utils/metadata.py,sha256=hJp_NHZh6zjQU_I3Rh5Xm-ecFZFDU2tQsGHMHomOEY0,50633
8
+ gha_utils/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
+ gha_utils/test_plan.py,sha256=AE8Mf1vSQG5EZTytoTts-gzMwUg2Zy21gUwkMlzXT94,13394
10
+ gha_utils-4.16.3.dist-info/METADATA,sha256=1nVYojly86OEs2S8GYTBWmwkmZvHervoBLRecjY9qD8,21344
11
+ gha_utils-4.16.3.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
12
+ gha_utils-4.16.3.dist-info/entry_points.txt,sha256=8bJOwQYf9ZqsLhBR6gUCzvwLNI9f8tiiBrJ3AR0EK4o,54
13
+ gha_utils-4.16.3.dist-info/top_level.txt,sha256=C94Blb61YkkyPBwCdM3J_JPDjWH0lnKa5nGZeZ5M6yE,10
14
+ gha_utils-4.16.3.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (79.0.1)
2
+ Generator: setuptools (80.4.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,14 +0,0 @@
1
- gha_utils/__init__.py,sha256=LlEyh-dMtbcrFG997ZmQj096FYvy4abI95x8TTo6gvc,866
2
- gha_utils/__main__.py,sha256=Dck9BjpLXmIRS83k0mghAMcYVYiMiFLltQdfRuMSP_Q,1703
3
- gha_utils/changelog.py,sha256=JR7iQrWjLoIOpVNe6iXQSyEii82_hM_zrYpR7QO_Uxo,5777
4
- gha_utils/cli.py,sha256=ZCfGZl7yE7dB_0Tsw0Znui0N80cfUDhMcPuoZIikSxw,13966
5
- gha_utils/mailmap.py,sha256=naUqJYJnE3fLTjju1nd6WMm7ODiSaI2SHuJxRtmaFWs,6269
6
- gha_utils/matrix.py,sha256=_afJD0K-xZLNxwykVnUhD0Gj9cdO0Z43g3VHa-q_tkI,11941
7
- gha_utils/metadata.py,sha256=hJp_NHZh6zjQU_I3Rh5Xm-ecFZFDU2tQsGHMHomOEY0,50633
8
- gha_utils/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
- gha_utils/test_plan.py,sha256=PZbWskpop02eiobg2g9GRWU3UDDfKUMhwJCvv6p9XsU,13144
10
- gha_utils-4.16.1.dist-info/METADATA,sha256=JJ4PIkkG01CSzDv2FNYr0AeCCnsgbub7cRTTgvzouRA,21328
11
- gha_utils-4.16.1.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
12
- gha_utils-4.16.1.dist-info/entry_points.txt,sha256=8bJOwQYf9ZqsLhBR6gUCzvwLNI9f8tiiBrJ3AR0EK4o,54
13
- gha_utils-4.16.1.dist-info/top_level.txt,sha256=C94Blb61YkkyPBwCdM3J_JPDjWH0lnKa5nGZeZ5M6yE,10
14
- gha_utils-4.16.1.dist-info/RECORD,,