From 5f2bc0d0de90b07e06b9fc67868abfe349d47129 Mon Sep 17 00:00:00 2001 From: Junya Morioka Date: Wed, 10 Dec 2025 19:27:17 +0900 Subject: [PATCH] ci: improve container testing stability and dependencies - Move "Install System Dependencies (Container)" step to an earlier position. - Add 'git' to the list of installed system dependencies. - Make system information commands (df, cpuinfo, os-release, free) more robust by adding '|| true'. - Replace 'lscpu' with 'cat /proc/cpuinfo' for better compatibility. --- .github/workflows/_test-container.yml | 40 +++++++++++++-------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/_test-container.yml b/.github/workflows/_test-container.yml index d5b84c8..504e53c 100644 --- a/.github/workflows/_test-container.yml +++ b/.github/workflows/_test-container.yml @@ -42,15 +42,31 @@ jobs: shell: bash steps: + - name: Install System Dependencies (Container) + shell: bash + run: | + # POSIX-compatible redirection so it works even without bash + if command -v dnf >/dev/null 2>&1; then + echo "dnf found" + dnf install -y --allowerasing libxml2 wget gcc gcc-c++ make curl sudo git + elif command -v yum >/dev/null 2>&1; then + echo "yum found" + yum install -y libxml2 wget gcc gcc-c++ make curl sudo git + elif command -v apt-get >/dev/null 2>&1; then + echo "apt-get found" + apt-get update + apt-get install -y libxml2 curl wget build-essential sudo git + fi + - name: Show Container Information run: | - df -h + df -h || true echo "-------" - lscpu + cat /proc/cpuinfo || true echo "-------" - cat /etc/os-release + cat /etc/os-release || true echo "-------" - free -h + free -h || true - name: Expand Disk Space run: | @@ -60,22 +76,6 @@ jobs: echo "-------" df -h - - name: Install System Dependencies (Container) - shell: bash - run: | - # POSIX-compatible redirection so it works even without bash - if command -v dnf >/dev/null 2>&1; then - echo "dnf found" - dnf install -y --allowerasing libxml2 wget gcc gcc-c++ make curl - elif command -v yum >/dev/null 2>&1; then - echo "yum found" - yum install -y libxml2 wget gcc gcc-c++ make curl - elif command -v apt-get >/dev/null 2>&1; then - echo "apt-get found" - apt-get update - apt-get install -y libxml2 curl wget build-essential - fi - - name: Checkout uses: actions/checkout@v5