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,133 @@ 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+
96+ - name : Start Docker daemon
97+ run : |
98+ dockerd-entrypoint.sh &
99+ sleep 10
100+ # done
101+
102+ - name : Show Docker version/info
103+ run : |
104+ docker version
105+ docker info
106+
107+ - name : Clean up Docker networks
108+ run : |
109+ docker network prune -f
110+ docker system prune -f
111+
112+ - name : Start Minikube
113+ uses : medyagh/setup-minikube@latest
114+ with :
115+ driver : docker
116+ wait : all
117+ start-args : ' --force'
118+
119+ - name : Check cluster status
120+ run : kubectl get nodes
121+
122+ - name : Collect Docker and iptables logs for debug
123+ if : failure()
124+ run : |
125+ sudo journalctl -u docker || true
126+ docker info || true
127+ ps auxf | grep dockerd || true
128+ sudo iptables -t nat -L -v -n || true
129+ tail -50 /tmp/dockerd.log || true
130+
131+ - name : Ensure kubeconfig set
132+ run : echo "KUBECONFIG=$HOME/.kube/config" >> $GITHUB_ENV
133+
134+ - name : Build setup scripts
135+ run : pushd scripts && go build -o setup_tool && popd
136+
137+ - name : Pull binaries
138+ run : ./scripts/setup_tool setup_firecracker_containerd
139+
140+ - name : Build
141+ run : go build -race -v -a ./...
142+
143+ - name : Run vHive end-to-end tests
144+ run : make ${{ matrix.test-name }}
145+
146+ - name : Archive log artifacts
147+ if : ${{ always() }}
148+ uses : actions/upload-artifact@v4
149+ with :
150+ name : ctrd-logs-${{ matrix.test-name }}
151+ path : |
152+ /tmp/ctrd-logs/
153+ ${{ github.workspace }}/*.log
154+ ${{ github.workspace }}/scripts/github_runner/*.log
155+
156+ - name : Cleaning
157+ if : ${{ always() }}
158+ run : ./scripts/setup_tool clean_fcctr
0 commit comments