From 83b9020a0c1bfafec751c2c4815d86659a6cecc6 Mon Sep 17 00:00:00 2001 From: Sergio Arroutbi Date: Wed, 4 Oct 2023 15:49:30 +0200 Subject: [PATCH] Fix CI execution and run in Fedora latest Resolves: #5 Signed-off-by: Sergio Arroutbi --- .github/workflows/run_test.yaml | 20 ++++++++++++++++--- .../workflows/scripts/install_dependencies.sh | 9 +++++++-- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/.github/workflows/run_test.yaml b/.github/workflows/run_test.yaml index 8b0d63a..08e15a9 100644 --- a/.github/workflows/run_test.yaml +++ b/.github/workflows/run_test.yaml @@ -14,11 +14,25 @@ on: workflow_dispatch: jobs: - deploy: + test-execution: runs-on: ubuntu-latest + + strategy: + matrix: + os: + - fedora:latest + + container: + image: ${{matrix.os}} + env: + DISTRO: ${{matrix.os}} + run: + set -eu + echo "DISTRO:${DISTRO}" + steps: - name: Checkout - uses: actions/checkout@vmaster + uses: actions/checkout@master - name: Minikube Installation id: minikube @@ -38,7 +52,7 @@ jobs: - name: Run test run: | - tree; make + pushd Sanity; make diff --git a/.github/workflows/scripts/install_dependencies.sh b/.github/workflows/scripts/install_dependencies.sh index 18ad3b3..3d62ec7 100644 --- a/.github/workflows/scripts/install_dependencies.sh +++ b/.github/workflows/scripts/install_dependencies.sh @@ -22,7 +22,8 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. # -COMMON="git file tree make" +COMMON="git file tree make clamav clamav-freshclam helm" +COMMAND_CHECK="kubectl clamscan helm" case "${DISTRO}" in debian:*|ubuntu:*) @@ -32,7 +33,7 @@ debian:*|ubuntu:*) # We get some errors once in a while, so let's try a few times. for i in 1 2 3; do apt -y install ${COMMON} ${DEBIAN_UBUNTU} && break - sleep 1 + sleep ${i} done ;; fedora:*|*centos:*) @@ -47,3 +48,7 @@ echo "================= SYSTEM =================" cat /etc/os-release uname -a echo "==========================================" + +for command in "${COMMAND_CHECK}"; do + command -v "${command}" +done