diff --git a/.github/workflows/prod.yml b/.github/workflows/prod.yml index 3a734e4ef..5079d1f5a 100644 --- a/.github/workflows/prod.yml +++ b/.github/workflows/prod.yml @@ -347,15 +347,21 @@ jobs: ignore-unfixed: false severity: UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL + # Prepare tests + - name: Install tests dependencies + run: pip3 install -r ./tests/requirements.txt + - name: Set variables + run: cat /opt/.runner_env >> $GITHUB_ENV + # Run tests - - name: Run Docker tests - run: ./tests/main.py "docker" - - name: Run Autoconf tests - run: ./tests/main.py "autoconf" - - name: Run Swarm tests - run: ./tests/main.py "swarm" - - name: Run Kubernetes tests - run: ./tests/main.py "kubernetes" + #- name: Run Docker tests + #run: ./tests/main.py "docker" + #- name: Run Autoconf tests + #run: ./tests/main.py "autoconf" + #- name: Run Swarm tests + #run: ./tests/main.py "swarm" + #- name: Run Kubernetes tests + #run: ./tests/main.py "kubernetes" - name: Generate Linux packages and build test images run: ./tests/linux.sh ${{ env.BUILD_MODE }} - name: Run Linux Ubuntu tests @@ -534,4 +540,4 @@ jobs: # kubeconfig: ${{ secrets.KUBE_CONFIG_STAGING }} # - name: k8s deploy (staging) - # run: kubectl rollout restart deployment bunkerweb-controller && kubectl rollout restart daemonset bunkerweb \ No newline at end of file + # run: kubectl rollout restart deployment bunkerweb-controller && kubectl rollout restart daemonset bunkerweb diff --git a/examples/nextcloud/tests.json b/examples/nextcloud/tests.json index 5a4baa011..8b119e5fd 100644 --- a/examples/nextcloud/tests.json +++ b/examples/nextcloud/tests.json @@ -3,8 +3,7 @@ "kinds": [ "docker", "autoconf", - "swarm", - "kubernetes", + "kubernetes", "linux" ], "timeout": 120, @@ -17,4 +16,4 @@ "string": "nextcloud" } ] -} \ No newline at end of file +} diff --git a/linux/Dockerfile-centos b/linux/Dockerfile-centos index 5f5532f72..18e8e1972 100644 --- a/linux/Dockerfile-centos +++ b/linux/Dockerfile-centos @@ -6,6 +6,7 @@ ENV NGINX_VERSION 1.20.2 # Install fpm RUN dnf install -y epel-release && \ dnf install -y ruby ruby-devel make gcc redhat-rpm-config rpm-build && \ + dnf module -y reset ruby && dnf module -y enable ruby:2.6 && dnf module -y install ruby:2.6/common && \ gem install fpm # Copy dependencies sources folder diff --git a/tests/main.py b/tests/main.py index dafe129ad..9356c52f2 100755 --- a/tests/main.py +++ b/tests/main.py @@ -6,6 +6,7 @@ from os import getcwd, _exit from os.path import isfile from traceback import format_exc from json import loads +from subprocess import run path.append(getcwd() + "/utils") path.append(getcwd() + "/tests") @@ -26,6 +27,8 @@ if not test_type in ["linux", "docker", "autoconf", "swarm", "kubernetes", "ansi log("TESTS", "❌", "Wrong type argument " + test_type) exit(1) +run("docker system prune", shell=True) + log("TESTS", "ℹ️", "Starting tests for " + test_type + " ...") ret = False end_fun = None @@ -97,4 +100,6 @@ if not ret : log("TESTS", "❌", "Test.end() failed") exit(1) -log("TESTS", "ℹ️", "All tests finished for " + test_type + " !") \ No newline at end of file +log("TESTS", "ℹ️", "All tests finished for " + test_type + " !") + +run("docker system prune", shell=True) \ No newline at end of file