9
9
jobs :
10
10
test :
11
11
strategy :
12
+ fail-fast : false
12
13
matrix :
13
14
suite :
14
15
- e2e
15
16
- critest
16
- name : ${{matrix.suite}}
17
+ oci-runtime :
18
+ - crun
19
+ - runc
20
+ monitor :
21
+ - conmon
22
+ - conmon-rs
23
+ name : ${{matrix.suite}} / ${{matrix.oci-runtime}} / ${{matrix.monitor}}
17
24
runs-on : ubuntu-22.04
18
25
steps :
26
+ - name : Checkout cri-tools
27
+ uses : actions/checkout@v4
28
+
19
29
- name : Install go
20
30
uses : actions/setup-go@v5
21
31
with :
22
32
go-version : ' 1.22'
23
- cache : false
24
-
25
- - name : Setup environment
26
- shell : bash
27
- run : |
28
- echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
29
- echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
30
-
31
- - name : Cache go modules and build cache
32
- uses : actions/cache@v4
33
- with :
34
- path : |
35
- ~/go/pkg/mod
36
- ~/.cache/go-build
37
- '%LocalAppData%\go-build' # Windows
38
- key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
39
- restore-keys : ${{ runner.os }}-go-
40
33
41
34
- name : Setup system
42
35
run : |
@@ -55,47 +48,72 @@ jobs:
55
48
ginkgo version
56
49
sudo cp $(command -v ginkgo) /usr/local/bin
57
50
58
- - name : Install CRI-O latest main
51
+ - name : Install CRI-O
59
52
run : |
60
53
curl https://raw.githubusercontent.com/cri-o/packaging/main/get | sudo bash
61
54
62
- - name : Configure and start CRI-O
55
+ - name : Configure CRI-O
63
56
run : |
64
57
sudo mkdir -p /etc/crio/crio.conf.d
65
58
printf '[crio.runtime]\nlog_level = "debug"\n' | sudo tee /etc/crio/crio.conf.d/01-log-level.conf
66
- printf '[crio.runtime]\nseccomp_use_default_when_empty = false\n' | sudo tee /etc/crio/crio.conf.d/02-seccomp.conf
59
+
60
+ - name : Configure CRI-O to use conmon-rs intead of the default conmon
61
+ if : ${{matrix.monitor == 'conmon-rs'}}
62
+ run : |
63
+ sudo sed -i -E 's;(monitor_path = ).*;\1"/usr/libexec/crio/conmonrs"\nruntime_type = "pod";g' /etc/crio/crio.conf.d/10-crio.conf
64
+
65
+ - name : Configure CRI-O to use runc instead of the default crun
66
+ if : ${{matrix.oci-runtime == 'runc'}}
67
+ run : |
68
+ sudo sed -i -E 's;(default_runtime = ).*;\1"runc";g' /etc/crio/crio.conf.d/10-crio.conf
69
+
70
+ - name : Show the CRI-O config drop-in
71
+ run : cat /etc/crio/crio.conf.d/10-crio.conf
72
+
73
+ - name : Start CRI-O
74
+ run : |
67
75
sudo systemctl daemon-reload
68
76
sudo systemctl start crio
69
-
70
- - name : Checkout cri-tools for this commit
71
- uses : actions/checkout@v4
72
- with :
73
- path : ${{github.workspace}}/src/github.com/kubernetes-sigs/cri-tools
77
+ sudo crio status config
74
78
75
79
- name : Build cri-tools
76
80
run : |
77
81
make
78
82
sudo -E PATH=$PATH make install
79
- working-directory : ${{ github.workspace }}/src/github.com/kubernetes-sigs/cri-tools
80
83
81
84
- name : Run critest
82
85
if : ${{matrix.suite == 'critest'}}
86
+ shell : bash
83
87
run : |
88
+ set -euox pipefail
89
+
90
+ ARGS=()
91
+ if [[ "${{matrix.oci-runtime}}" == "crun" && "${{matrix.monitor}}" == "conmon-rs" ]]; then
92
+ # TODO: check why these tests fail on that combination
93
+ ARGS=(--ginkgo.skip 'SupplementalGroups|AppArmor|RunAsUser')
94
+ fi
95
+
84
96
sudo -E PATH=$PATH critest \
85
97
--runtime-endpoint=unix:///var/run/crio/crio.sock \
86
- --ginkgo.flakeAttempts=3 \
87
- --parallel=$(nproc)
88
- sudo journalctl -u crio > cri-o.log
98
+ --parallel=$(nproc) \
99
+ --ginkgo.flake-attempts=3 \
100
+ --ginkgo.randomize-all \
101
+ --ginkgo.timeout=2m \
102
+ --ginkgo.trace \
103
+ --ginkgo.vv \
104
+ "${ARGS[@]}"
89
105
90
106
- name : Run crictl e2e tests
91
107
if : ${{matrix.suite == 'e2e'}}
92
108
run : |
93
109
sudo -E PATH=$PATH make test-e2e \
94
110
TESTFLAGS="-crictl-runtime-endpoint=unix://var/run/crio/crio.sock"
95
- working-directory : ${{ github.workspace }}/src/github.com/kubernetes-sigs/cri-tools
111
+
112
+ - name : Collect CRI-O logs
113
+ run : sudo journalctl -u crio > cri-o.log
96
114
97
115
- name : Upload CRI-O logs
98
116
uses : actions/upload-artifact@v4
99
117
with :
100
- name : cri-o-${{matrix.version }}-${{github.sha}}.log
118
+ name : cri-o-${{matrix.suite}}-${{matrix.oci-runtime}}-${{matrix.monitor }}-${{github.sha}}.log
101
119
path : cri-o.log
0 commit comments