-
Notifications
You must be signed in to change notification settings - Fork 4
163 lines (143 loc) · 5.06 KB
/
Copy pathe2e-kind.yaml
File metadata and controls
163 lines (143 loc) · 5.06 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
# Copyright 2026 The Actordock Authors.
# SPDX-License-Identifier: Apache-2.0
name: e2e-kind
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
unit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.24.x"
- name: Test
run: go test ./...
e2e-functional:
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.24.x"
- name: Install kind
run: |
curl -fsSL -o ./kind "https://kind.sigs.k8s.io/dl/v0.27.0/kind-linux-amd64"
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind
- name: Create cluster and deploy
env:
KIND_CLUSTER_NAME: actordock-functional
POLICY: fifo
run: |
chmod +x hack/*.sh
./hack/kind-up.sh
- name: Functional e2e (all four policies via SetPolicy)
env:
KIND_CLUSTER_NAME: actordock-functional
E2E_SUITE: functional
SANDBOX_COUNT: "5"
MAX_RUNNING: "4"
MIN_WORKERS: "2"
run: ./hack/verify-local.sh
- name: Dump on failure
if: failure()
run: |
kubectl --context kind-actordock-functional -n actordock get pods -o wide || true
kubectl --context kind-actordock-functional -n actordock describe pods || true
kubectl --context kind-actordock-functional -n actordock logs deploy/controlplane --all-containers=true || true
kubectl --context kind-actordock-functional -n actordock logs statefulset/worker --all-containers=true || true
- name: Teardown
if: always()
env:
KIND_CLUSTER_NAME: actordock-functional
run: ./hack/kind-down.sh || true
e2e-eval:
runs-on: ubuntu-latest
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
policy: [fifo, random, lru-idle, resource-evict]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.24.x"
- name: Install kind
run: |
curl -fsSL -o ./kind "https://kind.sigs.k8s.io/dl/v0.27.0/kind-linux-amd64"
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind
- name: Create cluster and deploy
env:
KIND_CLUSTER_NAME: actordock-eval-${{ matrix.policy }}
POLICY: ${{ matrix.policy }}
run: |
chmod +x hack/*.sh
./hack/kind-up.sh
- name: Eval e2e (S1–S5 for ${{ matrix.policy }})
env:
KIND_CLUSTER_NAME: actordock-eval-${{ matrix.policy }}
E2E_SUITE: eval
E2E_TIMEOUT: 30m
MIN_WORKERS: "4"
EVAL_POLICY: ${{ matrix.policy }}
EVAL_OUT_DIR: docs/eval/results
run: |
mkdir -p docs/eval/results
./hack/verify-local.sh
test -f "docs/eval/results/policy_report_${{ matrix.policy }}.json"
ls -la docs/eval/results/
- name: Upload policy report
if: success()
uses: actions/upload-artifact@v4
with:
name: policy-compare-${{ matrix.policy }}
path: docs/eval/results/policy_report_${{ matrix.policy }}.json
if-no-files-found: error
- name: Dump on failure
if: failure()
run: |
kubectl --context kind-actordock-eval-${{ matrix.policy }} -n actordock get pods -o wide || true
kubectl --context kind-actordock-eval-${{ matrix.policy }} -n actordock describe pods || true
kubectl --context kind-actordock-eval-${{ matrix.policy }} -n actordock logs deploy/controlplane --all-containers=true || true
kubectl --context kind-actordock-eval-${{ matrix.policy }} -n actordock logs statefulset/worker --all-containers=true || true
- name: Teardown
if: always()
env:
KIND_CLUSTER_NAME: actordock-eval-${{ matrix.policy }}
run: ./hack/kind-down.sh || true
e2e-eval-summary:
runs-on: ubuntu-latest
needs: e2e-eval
if: always() && needs.e2e-eval.result != 'cancelled'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.24.x"
- name: Download per-policy eval artifacts
uses: actions/download-artifact@v4
with:
pattern: policy-compare-*
path: docs/eval/results/parts
merge-multiple: true
- name: Merge policy comparison table
run: |
mkdir -p docs/eval/results
echo "==> downloaded reports:"
find docs/eval/results/parts -type f -name 'policy_report_*.json' -print
go run ./hack/merge-eval-results docs/eval/results/parts docs/eval/results/policy_compare.md
cat docs/eval/results/policy_compare.md
- name: Upload merged comparison
uses: actions/upload-artifact@v4
with:
name: policy-compare-all
path: docs/eval/results/policy_compare.md
if-no-files-found: error