Skip to content

Consolidate and improve local testing workflow for Runway Helm charts

Problem Statement

Currently, we have a test script (charts/testing/runway-gke.sh) that creates service Helm charts and deployment charts, then runs kubeconform and helm-unittest on them locally. This script was a precursor to the CI jobs but has become somewhat redundant and only exists for GKE (not EKS).

The current state leads to:

  • Code duplication between the local test script and CI job implementations
  • Longer development cycles when developers rely solely on CI for validation
  • Inconsistent testing approaches between local development and CI

Current State

  • Local test script exists at charts/testing/runway-gke.sh (GKE only)
  • CI jobs implement similar logic but separately
  • No pre-commit hooks for automatic local validation
  • Developers must manually run tests or wait for CI feedback

Proposed Solutions

We should choose one of the following approaches:

Option 1: Remove local scripts

  • Remove the test script entirely
  • Rely exclusively on CI jobs for validation
  • Pros: Less code to maintain
  • Cons: Longer development feedback cycles

Option 2: Refactor to share logic

  • Extract main test logic from CI jobs into reusable shell scripts in scripts/
  • Refactor charts/testing/runway-gke.sh to call these shared scripts
  • Create equivalent script for EKS testing
  • Pros: DRY principle, consistent testing
  • Cons: Requires refactoring effort

Option 3: Integrate with pre-commit hooks

  • Same as Option 2, plus integrate with pre-commit framework
  • Tests run automatically before commits
  • Pros: Catches issues earliest, best developer experience
  • Cons: Most implementation effort, may slow down commits

Acceptance Criteria

  • Single source of truth for test logic (no duplication)
  • Consistent testing between local development and CI
  • Support for both GKE and EKS deployments
  • Clear documentation for developers on how to run tests locally
  • Tests include: kubeconform validation, helm-unittest, kyverno, and any other relevant checks

Additional Context

OPTION 3 WAS CHOSEN AND IMPLEMENTED

Edited by Sahand Abbasi