1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-10-18 00:50:07 +00:00

fix(ci): fix linter workflow dependencies, python version, and shellcheck issues

This commit is contained in:
catborise 2026-09-25 16:09:01 +03:00
parent 070e3baf75
commit 8306f0d761
3 changed files with 12 additions and 9 deletions

View file

@ -38,29 +38,29 @@ jobs:
# Checkout the code base # # Checkout the code base #
########################## ##########################
- name: Checkout Code - name: Checkout Code
uses: actions/checkout@v2 uses: actions/checkout@v4
with: with:
# Full git history is needed to get a proper list of changed files within `super-linter` # Full git history is needed to get a proper list of changed files within `super-linter`
fetch-depth: 0 fetch-depth: 0
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v2 uses: actions/setup-python@v5
with: with:
python-version: '3.x' python-version: '3.12'
- name: Install Required packages - name: Install Required packages
run: | 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 - name: Create & Activate VENV
run: | run: |
python3 -m venv venv python3 -m venv venv
source venv/bin/activate echo "$GITHUB_WORKSPACE/venv/bin" >> $GITHUB_PATH
- name: Install dependencies - name: Install dependencies
run: | run: |
python3 -m pip install --upgrade pip pip3 install --upgrade pip setuptools wheel
pip3 install wheel
if [ -f dev/requirements.txt ]; then pip3 install -r dev/requirements.txt; else pip3 install -r conf/requirements.txt; fi 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 # # Run Linter against code base #
@ -72,6 +72,7 @@ jobs:
DEFAULT_BRANCH: master DEFAULT_BRANCH: master
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VALIDATE_ALL_CODEBASE: false VALIDATE_ALL_CODEBASE: false
VALIDATE_MARKDOWN: false
VALIDATE_ANSIBLE: false VALIDATE_ANSIBLE: false
VALIDATE_CLOJURE: false VALIDATE_CLOJURE: false
VALIDATE_COFFEE: false VALIDATE_COFFEE: false

View file

@ -41,6 +41,7 @@ fi
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" 2>/dev/null && pwd)" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" 2>/dev/null && pwd)"
TMP_DIR="" TMP_DIR=""
# shellcheck disable=SC2329
cleanup() { cleanup() {
if [ -n "$TMP_DIR" ] && [ -d "$TMP_DIR" ]; then if [ -n "$TMP_DIR" ] && [ -d "$TMP_DIR" ]; then
rm -rf "$TMP_DIR" rm -rf "$TMP_DIR"

View file

@ -89,6 +89,7 @@ progress () {
echo "" echo ""
} }
# shellcheck disable=SC2294
log () { log () {
if [ -n "$verbose" ]; then if [ -n "$verbose" ]; then
eval "$@" |& tee -a /var/log/webvirtcloud-install.log eval "$@" |& tee -a /var/log/webvirtcloud-install.log
@ -473,7 +474,7 @@ until [[ $setupfqdn == "yes" ]] || [[ $setupfqdn == "no" ]]; do
read -r fqdn_from_user read -r fqdn_from_user
setupfqdn="yes" setupfqdn="yes"
if [ ! -z $fqdn_from_user ]; then if [ -n "$fqdn_from_user" ]; then
fqdn=$fqdn_from_user fqdn=$fqdn_from_user
fi fi