Skip to content

Commit b0410ed

Browse files
committed
Fix github actions workflow file
1 parent 5ae40a4 commit b0410ed

1 file changed

Lines changed: 21 additions & 21 deletions

File tree

.github/workflows/integration-tests.yml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,10 @@ jobs:
3131
- name: Set up Docker (Windows)
3232
if: runner.os == 'Windows'
3333
run: |
34-
# Ensure Docker Desktop is using WSL2 backend for Linux containers
3534
docker version
3635
docker info | Select-String -Pattern "OSType"
37-
# Verify we can build Linux containers
3836
docker pull alpine:latest
37+
shell: powershell
3938

4039
- name: Install Kind (Linux)
4140
if: runner.os == 'Linux'
@@ -82,7 +81,6 @@ jobs:
8281
kind version
8382
kubectl version --client
8483
helm version
85-
shell: bash
8684
8785
- name: Build Docker images (Linux)
8886
if: runner.os == 'Linux'
@@ -93,7 +91,6 @@ jobs:
9391
- name: Build Docker images (Windows)
9492
if: runner.os == 'Windows'
9593
run: |
96-
# Build Linux containers on Windows using WSL2 backend
9794
Get-ChildItem -Path containers -Directory | ForEach-Object {
9895
$name = $_.Name
9996
Write-Host "Building $name..."
@@ -109,7 +106,7 @@ jobs:
109106

110107
- name: Create Kind cluster
111108
run: |
112-
kind create cluster --name aggregator-test --config integration-test/kind-test-config.yaml --wait 120s
109+
kind create cluster --name aggregator --config k8s/kind-config.yaml --wait 120s
113110
timeout-minutes: 10
114111

115112
- name: Load images into Kind (Linux)
@@ -119,12 +116,9 @@ jobs:
119116
if [ -d "$dir" ]; then
120117
name=$(basename "$dir")
121118
echo "Loading $name into kind..."
122-
kind load docker-image "$name:latest" --name aggregator-test
119+
kind load docker-image "$name:latest" --name aggregator
123120
fi
124121
done
125-
shell: bash
126-
shell: bash
127-
shell: bash
128122
timeout-minutes: 20
129123

130124
- name: Load images into Kind (Windows)
@@ -133,16 +127,15 @@ jobs:
133127
Get-ChildItem -Path containers -Directory | ForEach-Object {
134128
$name = $_.Name
135129
Write-Host "Loading $name into kind..."
136-
kind load docker-image "${name}:latest" --name aggregator-test
137130
kind load docker-image "${name}:latest" --name aggregator
131+
}
138132
shell: powershell
139133
timeout-minutes: 20
140134

141-
- name: Wait for cluster to be ready
142135
- name: Generate key pair for UMA proxy
143-
kubectl config use-context kind-aggregator-test
136+
run: |
144137
kubectl config use-context kind-aggregator
145-
shell: bash
138+
kubectl wait --for=condition=Ready nodes --all --timeout=120s
146139
openssl genrsa -out uma-proxy.key 4096
147140
openssl req -x509 -new -nodes -key uma-proxy.key -sha256 -days 3650 -out uma-proxy.crt -subj "/CN=Aggregator MITM CA"
148141
kubectl delete secret uma-proxy-key-pair -n default --ignore-not-found
@@ -159,7 +152,7 @@ jobs:
159152
run: |
160153
helm repo add traefik https://traefik.github.io/charts
161154
helm repo update
162-
kind export logs ./kind-logs --name aggregator || true
155+
helm upgrade --install aggregator-traefik traefik/traefik \
163156
--namespace aggregator-traefik \
164157
--create-namespace \
165158
--set ingressClass.enabled=true \
@@ -168,7 +161,7 @@ jobs:
168161
--set ports.websecure.hostPort=443 \
169162
--set service.type=ClusterIP \
170163
--set providers.kubernetesCRD.allowCrossNamespace=true \
171-
kind export logs ./kind-logs --name aggregator
164+
--wait --timeout=3m
172165
kubectl rollout status deployment aggregator-traefik -n aggregator-traefik --timeout=180s
173166
174167
- name: Deploy aggregator
@@ -178,13 +171,21 @@ jobs:
178171
kubectl apply -f k8s/app/aggregator.yaml
179172
kubectl rollout status deployment aggregator-server -n aggregator-app --timeout=120s
180173
181-
- name: Add /etc/hosts entry
174+
- name: Add /etc/hosts entry (Linux)
175+
if: runner.os == 'Linux'
182176
run: |
183177
echo "127.0.0.1 aggregator.local" | sudo tee -a /etc/hosts
178+
179+
- name: Add hosts entry (Windows)
180+
if: runner.os == 'Windows'
181+
run: |
182+
Add-Content -Path C:\Windows\System32\drivers\etc\hosts -Value "127.0.0.1 aggregator.local"
183+
shell: powershell
184+
184185
- name: Run integration tests
185186
run: |
186187
cd integration-test
187-
kind delete cluster --name aggregator || true
188+
go test -v -timeout 30m ./...
188189
timeout-minutes: 35
189190

190191
- name: Collect logs on failure (Linux)
@@ -195,7 +196,7 @@ jobs:
195196
echo "=== Docker Containers ==="
196197
docker ps -a
197198
echo "=== Kind Logs ==="
198-
kind export logs ./kind-logs --name aggregator-test || true
199+
kind export logs ./kind-logs --name aggregator || true
199200
200201
- name: Collect logs on failure (Windows)
201202
if: failure() && runner.os == 'Windows'
@@ -205,7 +206,7 @@ jobs:
205206
Write-Host "=== Docker Containers ==="
206207
docker ps -a
207208
Write-Host "=== Kind Logs ==="
208-
kind export logs ./kind-logs --name aggregator-test
209+
kind export logs ./kind-logs --name aggregator
209210
shell: powershell
210211
continue-on-error: true
211212

@@ -222,8 +223,7 @@ jobs:
222223
- name: Cleanup
223224
if: always()
224225
run: |
225-
kind delete cluster --name aggregator-test || true
226-
shell: bash
226+
kind delete cluster --name aggregator || true
227227
228228
notify:
229229
name: Notify Results

0 commit comments

Comments
 (0)