Skip to content

[Sync] Update project files from source repository (28c309d) - #203

Merged
mrz1836 merged 1 commit into
masterfrom
chore/sync-files-postmark-20260822-171355-28c309d
Aug 22, 2026
Merged

mrz1836 merged 1 commit into
masterfrom
chore/sync-files-postmark-20260822-171355-28c309d

Conversation

@mrz1836

@mrz1836 mrz1836 commented Aug 22, 2026

Copy link
Copy Markdown
Owner

What Changed

  • Enhanced .github/actions/setup-benchstat/action.yml with version selection logic that chooses between two benchstat builds based on the runner's Go version: benchstat-version for Go 1.25.x and benchstat-version-latest for Go >= the configurable minimum threshold
  • Added three new inputs to the setup-benchstat action: benchstat-version-latest (optional, defaults to empty), benchstat-latest-min-go (optional, defaults to "1.26"), and updated descriptions for benchstat-version and go-version
  • Added new output resolved-version to setup-benchstat action showing which benchstat version was selected for the runner's Go version
  • Rewrote version-check step to parse both GO_VERSION and BENCHSTAT_LATEST_MIN_GO using anchored regex matches, validate inputs, and select the appropriate benchstat build based on comparison logic
  • Modified .github/actions/validate-test-results/action.yml to extract test result parsing logic into a shared shell script and improve error handling with validation of test result counts
  • Added new file .github/scripts/test-result-helpers.sh containing shell functions for parsing test results from gotestsum JSON output
  • Enhanced .github/workflows/fortress-test-matrix.yml adding benchstat installation and benchmark comparison steps, new workflow inputs for controlling benchmark behavior, and additional outputs for benchmark-related artifacts

Why It Was Necessary

  • The benchstat tool (golang.org/x/perf) requires Go 1.25+ and periodically raises its go.mod 'go' directive, making newer builds incompatible with older Go toolchains that still meet the minimum requirement
  • Projects running tests across multiple Go versions (e.g., 1.25.x and 1.26.x) needed a way to automatically select the appropriate benchstat build for each runner without hard-coding version thresholds
  • Centralizing test result parsing logic into a shared script reduces duplication and improves maintainability across multiple GitHub Actions

Testing Performed

  • Validation logic includes explicit error handling for malformed version inputs (e.g., "1.25junk", "127", "1.2z") with anchored regex matches that reject invalid formats
  • Version selection logic tested against boundary conditions: Go < 1.25 (skip), Go 1.25.x (use base version), and Go >= minimum threshold (use latest version)
  • Test result parsing script includes validation that parsed test counts are numeric and match expected output format from gotestsum JSON

Impact / Risk

  • Breaking Change: None - the benchstat-version-latest input is optional and defaults to using benchstat-version when unset, maintaining backwards compatibility
  • Configuration Risk: Low - the action validates all version inputs and fails fast with clear error messages if benchstat-latest-min-go is malformed, preventing silent fallback to stale hard-coded values
  • Compatibility: Projects syncing these workflow files will automatically select the correct benchstat build for each Go version in their test matrix without requiring per-project configuration changes

@mrz1836 mrz1836 self-assigned this Aug 22, 2026
@mrz1836 mrz1836 added automated-sync Automated sync PR, e.g. from a fork or external repo automerge Label to automatically merge pull requests that meet all required conditions chore Simple dependency updates or version bumps labels Aug 22, 2026
@github-actions github-actions Bot added update General updates size/L Large change (201-500 lines) labels Aug 22, 2026
@mrz1836
mrz1836 merged commit ecb871b into master Aug 22, 2026
24 checks passed
@mrz1836
mrz1836 deleted the chore/sync-files-postmark-20260822-171355-28c309d branch August 22, 2026 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automated-sync Automated sync PR, e.g. from a fork or external repo automerge Label to automatically merge pull requests that meet all required conditions chore Simple dependency updates or version bumps size/L Large change (201-500 lines) update General updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

⌂ 换网址