forked from open-cluster-management-io/addon-contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (64 loc) · 1.77 KB
/
Copy pathe2e.yml
File metadata and controls
80 lines (64 loc) · 1.77 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
name: E2E
on:
workflow_call:
inputs:
repo:
required: true
type: string
artifacts:
required: false
type: string
env:
GO_REQUIRED_MIN_VERSION: ''
permissions:
contents: read
jobs:
e2e:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install DevSpace
uses: loft-sh/setup-devspace@main
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.25
- name: Setup kind
run: kind create cluster --wait 300s
- name: Setup Kubectl
uses: azure/setup-kubectl@v3
with:
version: 'v1.29.0'
- name: Setup Helm
uses: azure/setup-helm@v3
with:
version: 'v3.14.0'
- name: Install Clusteradm
run: |
go install open-cluster-management.io/clusteradm/cmd/clusteradm@latest
- name: Set KUBECONFIG
run: |
mkdir -p /home/runner/.kube
- name: Free Disk Space
run: |
echo "Disk usage before cleanup:"
df -h / | grep -E '^Filesystem|^/dev/root'
# Remove Android SDK to free ~10GB
sudo rm -rf /usr/local/lib/android
echo "Disk usage after cleanup:"
df -h / | grep -E '^Filesystem|^/dev/root'
- name: Test E2E
run: |
cd ${{ inputs.repo }} && make test-e2e
env:
KUBECONFIG: /home/runner/.kube/config
- name: Upload Artifacts
if: |
(success() || failure()) && inputs.artifacts != ''
uses: actions/upload-artifact@v4
with:
name: e2e-artifacts-${{ inputs.repo }}
path: ${{ inputs.artifacts }}
if-no-files-found: ignore
retention-days: 7