ci: cache Helm binary in CI to eliminate per-job download overhead
CI / push-validation (pull_request) Successful in 34s
CI / build (pull_request) Successful in 3m52s
CI / lint (pull_request) Successful in 3m57s
CI / helm (pull_request) Successful in 3m58s
CI / quality (pull_request) Successful in 4m32s
CI / typecheck (pull_request) Successful in 4m37s
CI / security (pull_request) Successful in 4m43s
CI / e2e_tests (pull_request) Successful in 7m4s
CI / integration_tests (pull_request) Successful in 10m46s
CI / unit_tests (pull_request) Successful in 13m30s
CI / docker (pull_request) Successful in 1m37s
CI / coverage (pull_request) Successful in 14m56s
CI / status-check (pull_request) Successful in 4s
CI / push-validation (pull_request) Successful in 34s
CI / build (pull_request) Successful in 3m52s
CI / lint (pull_request) Successful in 3m57s
CI / helm (pull_request) Successful in 3m58s
CI / quality (pull_request) Successful in 4m32s
CI / typecheck (pull_request) Successful in 4m37s
CI / security (pull_request) Successful in 4m43s
CI / e2e_tests (pull_request) Successful in 7m4s
CI / integration_tests (pull_request) Successful in 10m46s
CI / unit_tests (pull_request) Successful in 13m30s
CI / docker (pull_request) Successful in 1m37s
CI / coverage (pull_request) Successful in 14m56s
CI / status-check (pull_request) Successful in 4s
- Added HELM_VERSION: "v3.16.4" to the workflow global environment to enable DRY key construction for caching. - Introduced actions/cache@v3 (id: helm-cache) before the "Install Helm CLI" step in the unit_tests, integration_tests, and helm jobs to cache the Helm binary and reduce per-job download overhead (~15-25 seconds per job). - Made the "Install Helm CLI" step conditional on cache misses by using steps.helm-cache.outputs.cache-hit != 'true' in all three jobs. - Removed the hardcoded HELM_VERSION from the install script; it now relies on the HELM_VERSION environment variable. - Preserved checksum verification on cache miss to maintain integrity of the cached binary. ISSUES CLOSED: #10033
This commit is contained in:
@@ -10,6 +10,7 @@ env:
|
||||
UV_VERSION: "0.8.0"
|
||||
PYTHON_VERSION: "3.13"
|
||||
NOX_DEFAULT_VENV_BACKEND: "uv"
|
||||
HELM_VERSION: "v3.16.4"
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
@@ -185,9 +186,16 @@ jobs:
|
||||
run: |
|
||||
apt-get update && apt-get install -y -qq nodejs git curl tar && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
- name: Cache Helm binary
|
||||
uses: actions/cache@v3
|
||||
id: helm-cache
|
||||
with:
|
||||
path: /usr/local/bin/helm
|
||||
key: helm-${{ env.HELM_VERSION }}-linux-amd64
|
||||
|
||||
- name: Install Helm CLI
|
||||
if: steps.helm-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
HELM_VERSION="v3.16.4"
|
||||
ARCH="amd64"
|
||||
HELM_TARBALL="helm-${HELM_VERSION}-linux-${ARCH}.tar.gz"
|
||||
curl -fsSL "https://get.helm.sh/${HELM_TARBALL}" -o "/tmp/${HELM_TARBALL}"
|
||||
@@ -196,7 +204,8 @@ jobs:
|
||||
tar -xzf "/tmp/${HELM_TARBALL}" -C /tmp
|
||||
mv /tmp/linux-${ARCH}/helm /usr/local/bin/helm
|
||||
chmod +x /usr/local/bin/helm
|
||||
helm version --short
|
||||
env:
|
||||
HELM_VERSION: ${{ env.HELM_VERSION }}
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@@ -236,9 +245,16 @@ jobs:
|
||||
run: |
|
||||
apt-get update && apt-get install -y -qq nodejs git curl tar && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
- name: Cache Helm binary
|
||||
uses: actions/cache@v3
|
||||
id: helm-cache
|
||||
with:
|
||||
path: /usr/local/bin/helm
|
||||
key: helm-${{ env.HELM_VERSION }}-linux-amd64
|
||||
|
||||
- name: Install Helm CLI
|
||||
if: steps.helm-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
HELM_VERSION="v3.16.4"
|
||||
ARCH="amd64"
|
||||
HELM_TARBALL="helm-${HELM_VERSION}-linux-${ARCH}.tar.gz"
|
||||
curl -fsSL "https://get.helm.sh/${HELM_TARBALL}" -o "/tmp/${HELM_TARBALL}"
|
||||
@@ -247,7 +263,8 @@ jobs:
|
||||
tar -xzf "/tmp/${HELM_TARBALL}" -C /tmp
|
||||
mv /tmp/linux-${ARCH}/helm /usr/local/bin/helm
|
||||
chmod +x /usr/local/bin/helm
|
||||
helm version --short
|
||||
env:
|
||||
HELM_VERSION: ${{ env.HELM_VERSION }}
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@@ -473,9 +490,16 @@ jobs:
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Cache Helm binary
|
||||
uses: actions/cache@v3
|
||||
id: helm-cache
|
||||
with:
|
||||
path: /usr/local/bin/helm
|
||||
key: helm-${{ env.HELM_VERSION }}-linux-amd64
|
||||
|
||||
- name: Install Helm CLI
|
||||
if: steps.helm-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
HELM_VERSION="v3.16.4"
|
||||
ARCH="amd64"
|
||||
HELM_TARBALL="helm-${HELM_VERSION}-linux-${ARCH}.tar.gz"
|
||||
curl -fsSL "https://get.helm.sh/${HELM_TARBALL}" -o "/tmp/${HELM_TARBALL}"
|
||||
@@ -484,7 +508,8 @@ jobs:
|
||||
tar -xzf "/tmp/${HELM_TARBALL}" -C /tmp
|
||||
mv /tmp/linux-${ARCH}/helm /usr/local/bin/helm
|
||||
chmod +x /usr/local/bin/helm
|
||||
helm version --short
|
||||
env:
|
||||
HELM_VERSION: ${{ env.HELM_VERSION }}
|
||||
|
||||
- name: Install kubeconform
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user