1+ ---
12name : vHive integration tests
23
34on :
45 push :
5- branches : [ main, legacy-firecracker-v0.24.0-with-upf-support ]
6+ branches : [main, legacy-firecracker-v0.24.0-with-upf-support]
67 paths-ignore :
7- - ' docs/**'
8- - ' **.md'
9- - ' function-images/**'
8+ - ' docs/**'
9+ - ' **.md'
10+ - ' function-images/**'
1011 pull_request :
11- branches : [ main, legacy-firecracker-v0.24.0-with-upf-support ]
12+ branches : [main, legacy-firecracker-v0.24.0-with-upf-support]
1213 paths-ignore :
13- - ' docs/**'
14- - ' **.md'
15- - ' function-images/**'
14+ - ' docs/**'
15+ - ' **.md'
16+ - ' function-images/**'
1617 workflow_dispatch :
1718 schedule :
1819 - cron : ' 0 19 * * 1'
@@ -25,107 +26,128 @@ jobs:
2526 integration-tests :
2627 name : Integration tests
2728 runs-on : ubuntu-24.04
29+ services :
30+ docker :
31+ image : docker:dind
32+ options : >-
33+ --privileged
34+ ports :
35+ - 2375:2375
36+ env :
37+ DOCKER_TLS_CERTDIR : ' '
2838 strategy :
2939 fail-fast : false
3040 matrix :
3141 test-name : [test, test-man-bench]
3242 steps :
33- - uses : actions/checkout@v4
34- - name : Handle LFS Caching
35- uses : ./.github/actions/lfs-cache
36- with :
37- lfs_enabled : ' true'
38-
39- - name : Set up Go version in go.mod file
40- uses : actions/setup-go@v5
41- with :
42- go-version-file : ${{ github.workspace }}/go.mod
43- cache-dependency-path : |
44- **/go.sum
45- **/go.mod
46-
47- - name : Set up Python 3.x
48- uses : actions/setup-python@v5
49- with :
50- python-version : ' 3.x'
51-
52- - name : Add rsync
53- run : |
54- sudo apt update
55- sudo apt install rsync -y
56-
57- - name : Ensure /etc/cni/net.d exists
58- run : sudo mkdir -p /etc/cni/net.d
59-
60- - name : Install containerd and iptables
61- run : |
62- sudo apt-get update
63- sudo apt-get install -y containerd iptables
64-
65- - name : Install Docker
66- run : |
67- sudo apt-get update
68- sudo apt-get install -y docker.io
69-
70- - name : Start Docker Daemon
71- run : |
72- sudo dockerd > /tmp/dockerd.log 2>&1 &
73- sleep 5 # wait for dockerd to be ready
74- tries=0
75- until docker info >/dev/null 2>&1; do
76- if (( tries > 15 )); then
77- echo "Docker daemon failed to start"; exit 1
78- fi
79- sleep 2; ((tries++))
80- done
81-
82- - name : Clean up Docker networks
83- run : |
84- docker network prune -f
85- docker system prune -f
86-
87- - name : Start Minikube
88- uses : medyagh/setup-minikube@latest
89- with :
90- driver : docker
91- wait : all
92- start-args : ' --force'
93-
94- - name : Check cluster status
95- run : kubectl get nodes
96-
97- - name : Collect Docker and iptables logs for debug
98- if : failure()
99- run : |
100- tail -50 /tmp/dockerd.log || true
101- sudo iptables -t nat -L -v -n
102-
103- - name : Ensure kubeconfig set
104- run : |
105- echo "KUBECONFIG=$HOME/.kube/config" >> $GITHUB_ENV
106-
107- - name : Build setup scripts
108- run : pushd scripts && go build -o setup_tool && popd
109-
110- - name : Pull binaries
111- run : ./scripts/setup_tool setup_firecracker_containerd
112-
113- - name : Build
114- run : go build -race -v -a ./...
115-
116- - name : Run vHive end-to-end tests
117- run : make ${{ matrix.test-name }}
118-
119- - name : Archive log artifacts
120- if : ${{ always() }}
121- uses : actions/upload-artifact@v4
122- with :
123- name : ctrd-logs-${{ matrix.test-name }}
124- path : |
125- /tmp/ctrd-logs/
126- ${{ github.workspace }}/*.log
127- ${{ github.workspace }}/scripts/github_runner/*.log
128-
129- - name : Cleaning
130- if : ${{ always() }}
131- run : ./scripts/setup_tool clean_fcctr
43+ - uses : actions/checkout@v4
44+
45+ - name : Handle LFS Caching
46+ uses : ./.github/actions/lfs-cache
47+ with :
48+ lfs_enabled : true
49+
50+ - name : Set up Go version in go.mod file
51+ uses : actions/setup-go@v5
52+ with :
53+ go-version-file : ${{ github.workspace }}/go.mod
54+ cache-dependency-path : |
55+ **/go.sum
56+ **/go.mod
57+
58+ - name : Set up Python 3.x
59+ uses : actions/setup-python@v5
60+ with :
61+ python-version : ' 3.x'
62+
63+ - name : Add rsync and other dependencies
64+ run : |
65+ sudo apt-get update
66+ sudo apt-get install -y rsync fuse-overlayfs cni-plugins
67+
68+ # - name: Ensure /etc/cni/net.d exists
69+ # run: sudo mkdir -p /etc/cni/net.d
70+
71+ # - name: Install containerd and iptables
72+ # run: |
73+ # sudo apt-get update
74+ # sudo apt-get install -y containerd iptables
75+
76+ # Use system Docker, do not install or run your own daemon!
77+ # GitHub runners provide Docker pre-installed, fully privileged.
78+ # Uncomment next two steps ONLY IF YOU REALLY NEED DIN, otherwise use system docker.
79+
80+ # - name: Install Docker
81+ # run: |
82+ # sudo apt-get update
83+ # sudo apt-get install -y docker.io
84+
85+ # - name: Start Docker Daemon (DinD, not recommended on hosted runners)
86+ # run: |
87+ # sudo dockerd --storage-driver=overlay2 > /tmp/dockerd.log 2>&1 &
88+ # sleep 5
89+ # tries=0
90+ # until docker info >/dev/null 2>&1; do
91+ # if (( tries > 15 )); then
92+ # echo "Docker daemon failed to start"; tail -50 /tmp/dockerd.log; exit 1
93+ # fi
94+ # sleep 2; ((tries++))
95+ # done
96+
97+ - name : Show Docker version/info
98+ run : |
99+ docker version
100+ docker info
101+
102+ - name : Clean up Docker networks
103+ run : |
104+ docker network prune -f
105+ docker system prune -f
106+
107+ - name : Start Minikube
108+ uses : medyagh/setup-minikube@latest
109+ with :
110+ driver : docker
111+ wait : all
112+ start-args : ' --force'
113+
114+ - name : Check cluster status
115+ run : kubectl get nodes
116+
117+ - name : Collect Docker and iptables logs for debug
118+ if : failure()
119+ run : |
120+ sudo journalctl -u docker || true
121+ docker info || true
122+ ps auxf | grep dockerd || true
123+ sudo iptables -t nat -L -v -n || true
124+ tail -50 /tmp/dockerd.log || true
125+
126+ - name : Ensure kubeconfig set
127+ run : echo "KUBECONFIG=$HOME/.kube/config" >> $GITHUB_ENV
128+
129+ - name : Build setup scripts
130+ run : pushd scripts && go build -o setup_tool && popd
131+
132+ - name : Pull binaries
133+ run : ./scripts/setup_tool setup_firecracker_containerd
134+
135+ - name : Build
136+ run : go build -race -v -a ./...
137+
138+ - name : Run vHive end-to-end tests
139+ run : make ${{ matrix.test-name }}
140+
141+ - name : Archive log artifacts
142+ if : ${{ always() }}
143+ uses : actions/upload-artifact@v4
144+ with :
145+ name : ctrd-logs-${{ matrix.test-name }}
146+ path : |
147+ /tmp/ctrd-logs/
148+ ${{ github.workspace }}/*.log
149+ ${{ github.workspace }}/scripts/github_runner/*.log
150+
151+ - name : Cleaning
152+ if : ${{ always() }}
153+ run : ./scripts/setup_tool clean_fcctr
0 commit comments