Skip to content

feat(run-ginkgo): add composite action for Ginkgo test execution#97

Open
sydorovdmytro wants to merge 1 commit intomainfrom
feat/run-ginkgo
Open

feat(run-ginkgo): add composite action for Ginkgo test execution#97
sydorovdmytro wants to merge 1 commit intomainfrom
feat/run-ginkgo

Conversation

@sydorovdmytro
Copy link
Copy Markdown
Collaborator

@sydorovdmytro sydorovdmytro commented Apr 14, 2026

Summary

  • Adds run-ginkgo composite action that centralizes the duplicated Ginkgo
    test execution logic from all three production repos
  • Container-runtime agnostic — callers handle their own cluster and image
    setup (vind, Kind, etc.)
  • Structure follows repo conventions: YAML glue only in action.yml, business
    logic in src/ scripts, bats tests in test/

Action structure

.github/actions/run-ginkgo/
  action.yml              # thin glue — validates inputs, delegates to scripts
  src/execute-tests.sh    # builds ginkgo args, handles directory/label strategy
  src/generate-summary.sh # parses JSON report into markdown failure summary
  test/
    execute-tests.bats    # 15 tests: arg construction, label filtering, flags
    generate-summary.bats # 17 tests: all states, missing report, jq errors
    fixtures/             # sample Ginkgo JSON reports

Replaces

Repo Current approach
vcluster .github/actions/run-ginkgo-e2e/ (local composite action)
loft-enterprise .github/actions/run-ginkgo-e2e/ (local composite action)
vcluster-pro Inline Ginkgo steps in e2e-next.yaml + e2e-next-nightly.yaml

Key inputs

Input Default Description
test-image (required) Image passed to the test binary
test-image-flag --vcluster-image CLI flag name for the image
ginkgo-label / test-dir Mutually exclusive test selection
append-pr-label true Append || pr to label filter
additional-ginkgo-flags Extra ginkgo flags (e.g. -v, --skip-package=linters)
additional-args Extra args for the test binary

Test plan

  • shellcheck clean on both scripts
  • zizmor clean (0 findings) on action + test workflow
  • actionlint clean (make lint)
  • 32/32 bats tests pass locally (make test-run-ginkgo)
  • CI green on this PR
  • Migration PRs in vcluster, loft-enterprise, vcluster-pro (separate PRs after tag)

Centralizes the duplicated run-ginkgo-e2e logic from vcluster,
loft-enterprise (local composite actions), and vcluster-pro (inline
steps) into a single reusable composite action.

The action is container-runtime agnostic — callers handle their own
cluster and image setup (vind, Kind, etc.). Core responsibilities:
install Ginkgo, execute tests with directory or label-based filtering,
and generate a JSON failure summary.

Structure follows repo conventions:
- action.yml: thin YAML glue only
- src/execute-tests.sh: builds ginkgo args, handles strategy, runs tests
- src/generate-summary.sh: parses JSON report into markdown summary
- test/: 32 bats tests covering both scripts
- CI workflow + Makefile target

Key inputs: test-image, test-image-flag, ginkgo-label/test-dir,
additional-args, additional-ginkgo-flags, append-pr-label.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant