Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Commit e7a0600

Browse files
committed
ci: run test-integration target for all runtimes
Signed-off-by: Samuel Karp <[email protected]>
1 parent 61363b3 commit e7a0600

2 files changed

Lines changed: 24 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ jobs:
7878
linux-build-and-test:
7979
name: Build, Unit, Integration, and CRI (linux amd64)
8080
runs-on: ubuntu-18.04
81+
82+
strategy:
83+
matrix:
84+
runtime: [io.containerd.runtime.v1.linux, io.containerd.runc.v1, io.containerd.runc.v2]
85+
8186
steps:
8287
- name: Install Go
8388
uses: actions/setup-go@v1
@@ -122,8 +127,10 @@ jobs:
122127
working-directory: ${{github.workspace}}/src/github.com/containerd/cri
123128

124129
- name: Integration Test
130+
env:
131+
TEST_RUNTIME: ${{ matrix.runtime }}
125132
run: |
126-
make test-integration
133+
CONTAINERD_RUNTIME=$TEST_RUNTIME make test-integration
127134
working-directory: ${{github.workspace}}/src/github.com/containerd/cri
128135

129136
- name: Upload Integration Log File

hack/test-utils.sh

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,24 @@ CONTAINERD_FLAGS="--log-level=debug "
2323

2424
# Use a configuration file for containerd.
2525
CONTAINERD_CONFIG_FILE=${CONTAINERD_CONFIG_FILE:-""}
26-
if [ -z "${CONTAINERD_CONFIG_FILE}" ] && command -v sestatus >/dev/null 2>&1; then
27-
selinux_config="/tmp/containerd-config-selinux.toml"
28-
cat >${selinux_config} <<<'
26+
# The runtime to use (ignored when CONTAINERD_CONFIG_FILE is set)
27+
CONTAINERD_RUNTIME=${CONTAINERD_RUNTIME:-""}
28+
if [ -z "${CONTAINERD_CONFIG_FILE}" ]; then
29+
config_file="/tmp/containerd-config-cri.toml"
30+
truncate --size 0 "${config_file}"
31+
if command -v sestatus >/dev/null 2>&1; then
32+
cat >>${config_file} <<EOF
2933
[plugins.cri]
3034
enable_selinux = true
31-
'
32-
CONTAINERD_CONFIG_FILE=${CONTAINERD_CONFIG_FILE:-"${selinux_config}"}
35+
EOF
36+
fi
37+
if [ -n "${CONTAINERD_RUNTIME}" ]; then
38+
cat >>${config_file} <<EOF
39+
[plugins.cri.containerd.default_runtime]
40+
runtime_type="${CONTAINERD_RUNTIME}"
41+
EOF
42+
fi
43+
CONTAINERD_CONFIG_FILE="${config_file}"
3344
fi
3445

3546
# CONTAINERD_TEST_SUFFIX is the suffix appended to the root/state directory used

0 commit comments

Comments
 (0)