From 8306f0d7617f8a7cc890d2dde8447c15ebf46233 Mon Sep 17 00:00:00 2001 From: catborise Date: Fri, 25 Sep 2026 16:09:01 +0300 Subject: [PATCH] fix(ci): fix linter workflow dependencies, python version, and shellcheck issues --- .github/workflows/linter.yml | 17 +++++++++-------- install.sh | 1 + webvirtcloud.sh | 3 ++- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index e6a4139..22e721e 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -38,29 +38,29 @@ jobs: # Checkout the code base # ########################## - name: Checkout Code - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: # Full git history is needed to get a proper list of changed files within `super-linter` fetch-depth: 0 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: - python-version: '3.x' - + python-version: '3.12' + - name: Install Required packages run: | - sudo apt-get install -y python3-virtualenv libvirt-dev python3-lxml zlib1g-dev libxslt1-dev + sudo apt-get update -qq + sudo apt-get install -y python3-venv python3-virtualenv libvirt-dev libldap2-dev libsasl2-dev python3-lxml zlib1g-dev libxslt1-dev pkg-config gcc libssl-dev - name: Create & Activate VENV run: | python3 -m venv venv - source venv/bin/activate + echo "$GITHUB_WORKSPACE/venv/bin" >> $GITHUB_PATH - name: Install dependencies run: | - python3 -m pip install --upgrade pip - pip3 install wheel + pip3 install --upgrade pip setuptools wheel if [ -f dev/requirements.txt ]; then pip3 install -r dev/requirements.txt; else pip3 install -r conf/requirements.txt; fi ################################ # Run Linter against code base # @@ -72,6 +72,7 @@ jobs: DEFAULT_BRANCH: master GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} VALIDATE_ALL_CODEBASE: false + VALIDATE_MARKDOWN: false VALIDATE_ANSIBLE: false VALIDATE_CLOJURE: false VALIDATE_COFFEE: false diff --git a/install.sh b/install.sh index 580edca..7bf1489 100755 --- a/install.sh +++ b/install.sh @@ -41,6 +41,7 @@ fi SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" 2>/dev/null && pwd)" TMP_DIR="" +# shellcheck disable=SC2329 cleanup() { if [ -n "$TMP_DIR" ] && [ -d "$TMP_DIR" ]; then rm -rf "$TMP_DIR" diff --git a/webvirtcloud.sh b/webvirtcloud.sh index 8a5affa..6d2c878 100755 --- a/webvirtcloud.sh +++ b/webvirtcloud.sh @@ -89,6 +89,7 @@ progress () { echo "" } +# shellcheck disable=SC2294 log () { if [ -n "$verbose" ]; then eval "$@" |& tee -a /var/log/webvirtcloud-install.log @@ -473,7 +474,7 @@ until [[ $setupfqdn == "yes" ]] || [[ $setupfqdn == "no" ]]; do read -r fqdn_from_user setupfqdn="yes" - if [ ! -z $fqdn_from_user ]; then + if [ -n "$fqdn_from_user" ]; then fqdn=$fqdn_from_user fi