This repository was archived by the owner on Jul 6, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
72 lines (59 loc) · 1.68 KB
/
Copy pathtest-e2e.yml
File metadata and controls
72 lines (59 loc) · 1.68 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
name: E2E Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
test-e2e:
name: End-to-End Tests
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Install kind
run: |
curl -Lo ./kind https://kind.sigs.k8s.io/dl/latest/kind-linux-amd64
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind
kind version
- name: Create kind cluster
run: |
kind create cluster --name nio-e2e --wait 5m
kubectl cluster-info
kubectl wait --for=condition=Ready nodes --all --timeout=5m
- name: Build operator image
run: |
podman build -t nio-operator:test .
- name: Load image into kind
run: |
podman save nio-operator:test | kind load image-archive /dev/stdin --name nio-e2e
- name: Install CRDs
run: |
kubectl apply -f crds/
- name: Run E2E tests
run: |
# Run only E2E marked tests
pytest tests/ -v -m e2e --maxfail=5
- name: Collect logs on failure
if: failure()
run: |
kubectl get all -A
kubectl describe pods -A
kubectl logs -l app=nio-operator -n nixos-operator-system --tail=100 || true
- name: Cleanup
if: always()
run: |
kind delete cluster --name nio-e2e || true