feat/e2e-test-pipeline #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: End-to-End Testing | |
on: | |
push: | |
pull_request: | |
jobs: | |
end2end: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
- name: Set up K3S | |
uses: debianmaster/actions-k3s@master | |
with: | |
version: 'v1.26.9-k3s1' | |
- name: Secure Kubeconfig | |
run: | | |
chmod 600 /tmp/output/kubeconfig-v1.26.9-k3s1.yaml | |
- name: Setup Helm | |
run: | | |
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash | |
helm version | |
- name: Install Metrics Server | |
run: | | |
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml | |
- name: Get Image Tag | |
id: version | |
run: echo "value=commit-$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
- name: Install py-kube-downscaler | |
run: | | |
helm upgrade -i py-kube-downscaler \ | |
--atomic \ | |
--timeout 300s \ | |
--set image.tag=${{ steps.version.outputs.value }} \ | |
./chart | |
- name: Verify Deployment | |
run: | | |
kubectl rollout status deployment/py-kube-downscaler --timeout=60s | |
STATUS=$(kubectl get deployment py-kube-downscaler -o jsonpath='{.status.readyReplicas}') | |
if [[ "$STATUS" -ne 1 ]]; then | |
echo "Deployment py-kube-downscaler not ready" | |
kubectl get events | |
exit 1 | |
fi | |
echo "Deployment py-kube-downscaler OK" | |