add k8s deploy e2e test to CI and pre-push hook
- .github/workflows/test-k8s-deploy.yml: new workflow that installs kind+kubectl and runs tests/k8s-deploy/run-deploy-test.sh on every push and PR. Same script used locally and in release validation. - .pre-commit-config.yaml: add local pre-push hook that runs the k8s e2e test (~3 min) before pushing to remote. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>pull/740/head
parent
87761c7041
commit
c95eeeffb8
|
|
@ -0,0 +1,39 @@
|
||||||
|
name: K8s Deploy Test
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches: '*'
|
||||||
|
push:
|
||||||
|
branches: '*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
name: "Run k8s deploy e2e test suite"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: "Clone project repository"
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: "Install Python"
|
||||||
|
uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: '3.8'
|
||||||
|
- name: "Install kind"
|
||||||
|
run: |
|
||||||
|
[ -f /usr/local/bin/kind ] && exit 0
|
||||||
|
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.27.0/kind-linux-amd64
|
||||||
|
chmod +x ./kind
|
||||||
|
sudo mv ./kind /usr/local/bin/kind
|
||||||
|
- name: "Install kubectl"
|
||||||
|
run: |
|
||||||
|
[ -f /usr/local/bin/kubectl ] && exit 0
|
||||||
|
curl -Lo ./kubectl "https://dl.k8s.io/release/$(curl -sL https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
|
||||||
|
chmod +x ./kubectl
|
||||||
|
sudo mv ./kubectl /usr/local/bin/kubectl
|
||||||
|
- name: "Install shiv"
|
||||||
|
run: pip install shiv
|
||||||
|
- name: "Generate build version file"
|
||||||
|
run: ./scripts/create_build_tag_file.sh
|
||||||
|
- name: "Build local shiv package"
|
||||||
|
run: ./scripts/build_shiv_package.sh
|
||||||
|
- name: "Run k8s deploy e2e tests"
|
||||||
|
run: ./tests/k8s-deploy/run-deploy-test.sh
|
||||||
|
|
@ -32,3 +32,14 @@ repos:
|
||||||
hooks:
|
hooks:
|
||||||
- id: yamllint
|
- id: yamllint
|
||||||
args: [-d, relaxed]
|
args: [-d, relaxed]
|
||||||
|
|
||||||
|
# Pre-push: run the full k8s e2e test suite (~3 min).
|
||||||
|
# Same script used by CI and release validation.
|
||||||
|
- repo: local
|
||||||
|
hooks:
|
||||||
|
- id: k8s-deploy-test
|
||||||
|
name: k8s deploy e2e test
|
||||||
|
entry: tests/k8s-deploy/run-deploy-test.sh
|
||||||
|
language: system
|
||||||
|
stages: [pre-push]
|
||||||
|
pass_filenames: false
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue