Skip to content

Commit cd63426

Browse files
committed
Add 'interweb/' from commit 'fc1f7c1dd1559f4dc8655a653d4caef195c2ef71'
git-subtree-dir: interweb git-subtree-mainline: 268ff7d git-subtree-split: fc1f7c1
2 parents 268ff7d + fc1f7c1 commit cd63426

File tree

564 files changed

+688278
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

564 files changed

+688278
-0
lines changed
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Build Packages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- release/*
8+
pull_request:
9+
branches:
10+
- main
11+
- release/*
12+
workflow_dispatch: {}
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
timeout-minutes: 20
18+
19+
env:
20+
NEXT_TELEMETRY_DISABLED: 1
21+
22+
steps:
23+
- name: Checkout code
24+
uses: actions/checkout@v4
25+
26+
- name: Setup pnpm
27+
uses: pnpm/action-setup@v2
28+
with:
29+
version: 10.12.2
30+
31+
- name: Setup Node.js
32+
uses: actions/setup-node@v4
33+
with:
34+
node-version: "20.x"
35+
cache: "pnpm"
36+
37+
- name: Install dependencies
38+
run: pnpm install --frozen-lockfile
39+
40+
- name: Build packages
41+
run: pnpm build
42+
43+
lint:
44+
runs-on: ubuntu-latest
45+
timeout-minutes: 20
46+
47+
steps:
48+
- name: Checkout code
49+
uses: actions/checkout@v4
50+
51+
- name: Setup pnpm
52+
uses: pnpm/action-setup@v2
53+
with:
54+
version: 10.12.2
55+
56+
- name: Setup Node.js
57+
uses: actions/setup-node@v4
58+
with:
59+
node-version: "20.x"
60+
cache: "pnpm"
61+
62+
- name: Install dependencies
63+
run: pnpm install --frozen-lockfile
64+
65+
- name: Lint packages
66+
run: pnpm lint
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
name: Integration Test Client Package
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths:
7+
- 'packages/client/**'
8+
- 'packages/interwebjs/**'
9+
- 'packages/manifests/**'
10+
- '.github/workflows/test-client.yml'
11+
pull_request:
12+
branches: [ main ]
13+
paths:
14+
- 'packages/client/**'
15+
- 'packages/interwebjs/**'
16+
- 'packages/manifests/**'
17+
- '.github/workflows/test-client.yml'
18+
workflow_dispatch:
19+
inputs:
20+
kubeconfig:
21+
description: 'Custom kubeconfig (leave empty to use Kind cluster)'
22+
required: false
23+
default: ''
24+
cli-version:
25+
description: 'CLI version to test (0.0.0 for local testing)'
26+
required: false
27+
default: '0.0.0'
28+
29+
jobs:
30+
integration-tests:
31+
runs-on: ubuntu-latest
32+
timeout-minutes: 20
33+
34+
steps:
35+
- name: Checkout code
36+
uses: actions/checkout@v4
37+
38+
- name: Setup kubectl
39+
uses: azure/setup-kubectl@v3
40+
with:
41+
version: v1.31.3
42+
43+
- name: Setup Kind cluster
44+
if: ${{ inputs.kubeconfig == '' }}
45+
uses: helm/[email protected]
46+
with:
47+
cluster_name: kind
48+
kubectl_version: v1.31.3
49+
wait: 300s
50+
51+
- name: Setup pnpm
52+
uses: pnpm/action-setup@v2
53+
with:
54+
version: 10.12.2
55+
56+
- name: Setup Node.js
57+
uses: actions/setup-node@v4
58+
with:
59+
node-version: "20.x"
60+
cache: "pnpm"
61+
62+
- name: Install dependencies
63+
run: pnpm install --frozen-lockfile
64+
65+
- name: Build packages (excluding dashboard - TEMP)
66+
run: pnpm --filter='!@interweb/dashboard' build
67+
68+
- name: Verify cluster connection
69+
run: |
70+
kubectl cluster-info
71+
kubectl get nodes
72+
kubectl get namespaces
73+
74+
- name: Start kubectl proxy
75+
run: |
76+
kubectl proxy --port=8001 --accept-hosts='^.*$' --address='0.0.0.0' &
77+
echo "PROXY_PID=$!" >> $GITHUB_ENV
78+
# Wait for proxy to be ready
79+
sleep 5
80+
curl -f http://localhost:8001/api/v1/namespaces || exit 1
81+
echo "kubectl proxy is running on port 8001"
82+
env:
83+
K8S_API: http://127.0.0.1:8001
84+
85+
- name: Run unit tests
86+
run: |
87+
cd packages/client
88+
pnpm run tests:unit
89+
90+
- name: Run integration tests
91+
run: |
92+
cd packages/client
93+
pnpm run tests:integration
94+
env:
95+
K8S_API: http://127.0.0.1:8001
96+
NODE_ENV: test
97+
98+
- name: Check cluster state after tests
99+
if: always()
100+
run: |
101+
echo "=== Namespaces ==="
102+
kubectl get namespaces
103+
echo "=== Pods in all namespaces ==="
104+
kubectl get pods --all-namespaces
105+
echo "=== Events ==="
106+
kubectl get events --all-namespaces --sort-by='.lastTimestamp' | tail -20
Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
name: Test Client E2E (Per Operator)
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- "packages/client/**"
8+
- "packages/interwebjs/**"
9+
- "packages/manifests/**"
10+
- ".github/workflows/test-e2e-client.yml"
11+
pull_request:
12+
branches: [main]
13+
paths:
14+
- "packages/client/**"
15+
- "packages/interwebjs/**"
16+
- "packages/manifests/**"
17+
- ".github/workflows/test-e2e-client.yml"
18+
workflow_dispatch:
19+
20+
jobs:
21+
e2e-operators:
22+
runs-on: ubuntu-latest
23+
timeout-minutes: 40
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
operator:
28+
- ingress-nginx
29+
- cert-manager
30+
- knative-serving
31+
- cloudnative-pg
32+
- kube-prometheus-stack
33+
- minio-operator
34+
35+
steps:
36+
- name: Checkout code
37+
uses: actions/checkout@v4
38+
39+
- name: Setup kubectl
40+
uses: azure/setup-kubectl@v3
41+
with:
42+
version: v1.31.3
43+
44+
- name: Setup Kind cluster
45+
uses: helm/[email protected]
46+
with:
47+
cluster_name: kind
48+
kubectl_version: v1.31.3
49+
wait: 300s
50+
51+
- name: Setup pnpm
52+
uses: pnpm/action-setup@v2
53+
with:
54+
version: 10.12.2
55+
56+
- name: Setup Node.js
57+
uses: actions/setup-node@v4
58+
with:
59+
node-version: "20.x"
60+
cache: "pnpm"
61+
62+
- name: Install dependencies
63+
run: pnpm install --frozen-lockfile
64+
65+
- name: Build packages (excluding dashboard - TEMP)
66+
run: pnpm --filter='!@interweb/dashboard' build
67+
68+
- name: Verify cluster connection
69+
run: |
70+
kubectl cluster-info
71+
kubectl get nodes -o wide
72+
kubectl get namespaces
73+
74+
- name: Start kubectl proxy
75+
run: |
76+
kubectl proxy --port=8001 --accept-hosts='^.*$' --address='0.0.0.0' &
77+
echo "PROXY_PID=$!" >> $GITHUB_ENV
78+
sleep 5
79+
curl -f http://127.0.0.1:8001/api || (echo 'proxy failed' && exit 1)
80+
81+
- name: Run e2e per-operator test
82+
run: |
83+
cd packages/client
84+
pnpm run tests:e2e -- --runInBand --testPathPattern e2e.setup.operator.test.ts
85+
env:
86+
K8S_API: http://127.0.0.1:8001
87+
OPERATOR: ${{ matrix.operator }}
88+
NODE_ENV: test
89+
90+
- name: Cluster state after job
91+
if: always()
92+
run: |
93+
echo '=== Namespaces ==='
94+
kubectl get namespaces
95+
echo '=== Pods ==='
96+
kubectl get pods -A -o wide
97+
98+
e2e-postgres:
99+
runs-on: ubuntu-latest
100+
timeout-minutes: 45
101+
steps:
102+
- name: Checkout code
103+
uses: actions/checkout@v4
104+
105+
- name: Setup kubectl
106+
uses: azure/setup-kubectl@v3
107+
with:
108+
version: v1.31.3
109+
110+
- name: Setup Kind cluster
111+
uses: helm/[email protected]
112+
with:
113+
cluster_name: kind
114+
kubectl_version: v1.31.3
115+
wait: 300s
116+
117+
- name: Setup pnpm
118+
uses: pnpm/action-setup@v2
119+
with:
120+
version: 10.12.2
121+
122+
- name: Setup Node.js
123+
uses: actions/setup-node@v4
124+
with:
125+
node-version: "20.x"
126+
cache: "pnpm"
127+
128+
- name: Install dependencies
129+
run: pnpm install --frozen-lockfile
130+
131+
- name: Build packages (excluding dashboard - TEMP)
132+
run: pnpm --filter='!@interweb/dashboard' build
133+
134+
- name: Verify cluster connection
135+
run: |
136+
kubectl cluster-info
137+
kubectl get nodes -o wide
138+
kubectl get namespaces
139+
140+
- name: Start kubectl proxy
141+
run: |
142+
kubectl proxy --port=8001 --accept-hosts='^.*$' --address='0.0.0.0' &
143+
echo "PROXY_PID=$!" >> $GITHUB_ENV
144+
sleep 5
145+
curl -f http://127.0.0.1:8001/api || (echo 'proxy failed' && exit 1)
146+
147+
- name: Run Postgres E2E
148+
run: |
149+
cd packages/client
150+
pnpm run tests:e2e -- --runInBand --testPathPattern e2e.postgres.test.ts
151+
env:
152+
K8S_API: http://127.0.0.1:8001
153+
NODE_ENV: test
154+
155+
- name: Cluster state after job
156+
if: always()
157+
run: |
158+
echo '=== Namespaces ==='
159+
kubectl get namespaces
160+
echo '=== Pods ==='
161+
kubectl get pods -A -o wide

0 commit comments

Comments
 (0)