From f508c27674ff077045566979e82e4e4255728835 Mon Sep 17 00:00:00 2001 From: Gris Ge Date: Fri, 21 Jan 2022 18:22:59 +0800 Subject: [PATCH] CI: Enable CentOS 7 integration test Removed `tests_wireless_nm.yml` as github CI has no mac80211_hwsim kernel module. Signed-off-by: Gris Ge --- .github/Dockerfile.c7-network-role | 11 +++++++++++ .github/run_test.sh | 5 ++++- .github/workflows/integration.yml | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 .github/Dockerfile.c7-network-role diff --git a/.github/Dockerfile.c7-network-role b/.github/Dockerfile.c7-network-role new file mode 100644 index 0000000..31e4943 --- /dev/null +++ b/.github/Dockerfile.c7-network-role @@ -0,0 +1,11 @@ +FROM quay.io/centos/centos:centos7 + +RUN yum -y install epel-release && \ + yum -y upgrade && \ + yum -y install NetworkManager NetworkManager-wifi \ + procps-ng iproute ansible openssh-server openssh-clients \ + dnsmasq hostapd wpa_supplicant openssl ethtool iputils && yum clean all + +VOLUME [ "/sys/fs/cgroup" ] + +CMD ["/usr/sbin/init"] diff --git a/.github/run_test.sh b/.github/run_test.sh index 9ccfbd3..9b02475 100755 --- a/.github/run_test.sh +++ b/.github/run_test.sh @@ -5,6 +5,7 @@ set -euo pipefail TEST_SOURCE_DIR="/network-role" C8S_CONTAINER_IMAGE="quay.io/linux-system-roles/c8s-network-role" C8_CONTAINER_IMAGE="quay.io/linux-system-roles/c8-network-role" +C7_CONTAINER_IMAGE="quay.io/linux-system-roles/c7-network-role" PODMAN_OPTS="--systemd=true --privileged" read -r -d '' TEST_FILES << EOF || : @@ -21,7 +22,6 @@ tests_ethtool_ring_nm.yml tests_ipv6_disabled_nm.yml tests_ipv6_nm.yml tests_vlan_mtu_nm.yml -tests_wireless_nm.yml EOF EXEC_PATH=$(dirname "$(realpath "$0")") @@ -53,6 +53,9 @@ case $OS_TYPE in "c8") CONTAINER_IMAGE=$C8_CONTAINER_IMAGE ;; + "c7") + CONTAINER_IMAGE=$C7_CONTAINER_IMAGE + ;; *) echo "Unsupported OS type $OS_TYPE" exit 1 diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 3a592a3..f1c4f70 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -14,6 +14,7 @@ jobs: fail-fast: false matrix: include: + - os: "c7" - os: "c8" - os: "c8s"