gha-utils 4.16.1__tar.gz → 4.16.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of gha-utils might be problematic. Click here for more details.

Files changed (23) hide show
  1. {gha_utils-4.16.1 → gha_utils-4.16.3}/PKG-INFO +5 -5
  2. {gha_utils-4.16.1 → gha_utils-4.16.3}/gha_utils/__init__.py +1 -1
  3. {gha_utils-4.16.1 → gha_utils-4.16.3}/gha_utils/cli.py +8 -0
  4. {gha_utils-4.16.1 → gha_utils-4.16.3}/gha_utils/test_plan.py +6 -1
  5. {gha_utils-4.16.1 → gha_utils-4.16.3}/gha_utils.egg-info/PKG-INFO +5 -5
  6. {gha_utils-4.16.1 → gha_utils-4.16.3}/pyproject.toml +2 -2
  7. {gha_utils-4.16.1 → gha_utils-4.16.3}/readme.md +4 -4
  8. {gha_utils-4.16.1 → gha_utils-4.16.3}/gha_utils/__main__.py +0 -0
  9. {gha_utils-4.16.1 → gha_utils-4.16.3}/gha_utils/changelog.py +0 -0
  10. {gha_utils-4.16.1 → gha_utils-4.16.3}/gha_utils/mailmap.py +0 -0
  11. {gha_utils-4.16.1 → gha_utils-4.16.3}/gha_utils/matrix.py +0 -0
  12. {gha_utils-4.16.1 → gha_utils-4.16.3}/gha_utils/metadata.py +0 -0
  13. {gha_utils-4.16.1 → gha_utils-4.16.3}/gha_utils/py.typed +0 -0
  14. {gha_utils-4.16.1 → gha_utils-4.16.3}/gha_utils.egg-info/SOURCES.txt +0 -0
  15. {gha_utils-4.16.1 → gha_utils-4.16.3}/gha_utils.egg-info/dependency_links.txt +0 -0
  16. {gha_utils-4.16.1 → gha_utils-4.16.3}/gha_utils.egg-info/entry_points.txt +0 -0
  17. {gha_utils-4.16.1 → gha_utils-4.16.3}/gha_utils.egg-info/requires.txt +0 -0
  18. {gha_utils-4.16.1 → gha_utils-4.16.3}/gha_utils.egg-info/top_level.txt +0 -0
  19. {gha_utils-4.16.1 → gha_utils-4.16.3}/setup.cfg +0 -0
  20. {gha_utils-4.16.1 → gha_utils-4.16.3}/tests/test_changelog.py +0 -0
  21. {gha_utils-4.16.1 → gha_utils-4.16.3}/tests/test_mailmap.py +0 -0
  22. {gha_utils-4.16.1 → gha_utils-4.16.3}/tests/test_matrix.py +0 -0
  23. {gha_utils-4.16.1 → gha_utils-4.16.3}/tests/test_metadata.py +0 -0
@@ -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:
@@ -17,4 +17,4 @@
17
17
 
18
18
  from __future__ import annotations
19
19
 
20
- __version__ = "4.16.1"
20
+ __version__ = "4.16.3"
@@ -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)
@@ -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:
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  # Docs: https://packaging.python.org/en/latest/guides/writing-pyproject-toml/
3
3
  name = "gha-utils"
4
- version = "4.16.1"
4
+ version = "4.16.3"
5
5
  # Python versions and their status: https://devguide.python.org/versions/
6
6
  requires-python = ">= 3.11"
7
7
  description = "⚙️ CLI helpers for GitHub Actions + reuseable workflows"
@@ -137,7 +137,7 @@ addopts = [
137
137
  xfail_strict = true
138
138
 
139
139
  [tool.bumpversion]
140
- current_version = "4.16.1"
140
+ current_version = "4.16.3"
141
141
  allow_dirty = true
142
142
  ignore_missing_files = true
143
143
 
@@ -76,10 +76,10 @@ That's the best way to get started with `gha-utils` and experiment with it.
76
76
 
77
77
  To ease deployment, standalone executables of `gha-utils`'s latest version are available as direct downloads for several platforms and architectures:
78
78
 
79
- | Platform | `x86_64` | `arm64` |
80
- | ----------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
81
- | **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) |
82
- | **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) |
79
+ | Platform | `x86_64` | `arm64` |
80
+ | ----------- | --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
81
+ | **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) |
82
+ | **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) |
83
83
  | **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) |
84
84
 
85
85
  ABI targets:
File without changes