From fcf705bbaa547800726cd6f7fc042b2c45a42213 Mon Sep 17 00:00:00 2001 From: Manan Gupta Date: Wed, 21 Feb 2024 12:47:46 +0530 Subject: [PATCH] feat: check for memory available Signed-off-by: Manan Gupta --- .github/workflows/cluster_endtoend_vtorc.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/cluster_endtoend_vtorc.yml b/.github/workflows/cluster_endtoend_vtorc.yml index 39413d28cde..6758ae9d843 100644 --- a/.github/workflows/cluster_endtoend_vtorc.yml +++ b/.github/workflows/cluster_endtoend_vtorc.yml @@ -19,6 +19,14 @@ jobs: runs-on: gh-hosted-runners-4cores-1 steps: + - name: Check Memory + run: | + totalMem=$(free -g | awk 'NR==2 {print $2}') + echo "total memory $totalMem GB" + if [[ "$totalMem" -lt 15 ]]; then + echo "Less memory than required" + exit 1 + fi - name: Skip CI run: | if [[ "${{contains( github.event.pull_request.labels.*.name, 'Skip CI')}}" == "true" ]]; then