forked from kubernetes-sigs/karpenter
-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (96 loc) · 3.17 KB
/
Copy pathe2e.yaml
File metadata and controls
96 lines (96 loc) · 3.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: e2e
on:
workflow_call:
inputs:
k8s_version:
type: string
default: "1.36"
suite:
type: string
required: true
focus:
type: string
required: false
description: "Ginkgo focus pattern to run specific tests"
test_name:
type: string
required: false
description: "Human-readable test name for job identification"
jobs:
e2e:
permissions:
issues: write
runs-on: ubuntu-latest
name: ${{ inputs.test_name || format('suite-{0}', inputs.suite) }}
steps:
- name: Debug workflow_run trigger
run: |
echo "Event name: ${{ github.event_name }}"
echo "Workflow run conclusion: ${{ github.event.workflow_run.conclusion }}"
echo "Workflow run name: ${{ github.event.workflow_run.name }}"
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Python 3.10
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.10"
- uses: ./.github/actions/install-deps
with:
k8sVersion: ${{ inputs.k8s_version }}
- name: Kind Cluster
uses: helm/kind-action@ef37e7f390d99f746eb8b610417061a60e82a6cc # v1.14.0
- name: check kind cluster and taint nodes
shell: bash
run: |
kubectl config current-context
kubectl get nodes
kubectl taint nodes chart-testing-control-plane CriticalAddonsOnly:NoSchedule
- name: install prometheus
uses: ./.github/actions/install-prometheus
- name: install pyroscope
uses: ./.github/actions/install-pyroscope
- name: install ko
shell: bash
run: |
go install github.com/google/ko@latest
- name: install kwok and controller
shell: bash
run: |
make install-kwok
export KWOK_REPO=kind.local
export KIND_CLUSTER_NAME=chart-testing
make apply-with-kind
- name: ping cluster
shell: bash
run: |
sleep 15
kubectl get pods -n kube-system | grep karpenter
kubectl get nodepools
kubectl get pods -A
kubectl describe nodes
- name: run the ${{ inputs.test_name || inputs.suite }} test
env:
SUITE: ${{ inputs.suite }}
FOCUS: ${{ inputs.focus }}
shell: bash
run: |
OUTPUT_DIR=$(mktemp -d)
export OUTPUT_DIR
echo OUTPUT_DIR="$OUTPUT_DIR" >> "$GITHUB_ENV"
TEST_SUITE="$SUITE" make e2etests
- name: Upload performance results
if: always() && env.OUTPUT_DIR != ''
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: performance-results-${{ inputs.test_name || format('suite-{0}', inputs.suite) }}-${{ github.run_id }}
path: |
${{ env.OUTPUT_DIR }}/*_performance_report.json
${{ env.OUTPUT_DIR }}/karpenter_memory_profile_*.pb.gz
${{ env.OUTPUT_DIR }}/karpenter_cpu_profile_*.pb.gz
retention-days: 30
if-no-files-found: ignore
- name: cleanup
shell: bash
run: |
kubectl delete nodepools --all
make delete
make uninstall-kwok