diff --git a/.automation/clean-code-base-for-tests.sh b/.automation/clean-code-base-for-tests.sh index 8cd28e9c..e61fb7e4 100755 --- a/.automation/clean-code-base-for-tests.sh +++ b/.automation/clean-code-base-for-tests.sh @@ -9,8 +9,6 @@ ########### GITHUB_WORKSPACE="${GITHUB_WORKSPACE}" # GitHub Workspace GITHUB_SHA="${GITHUB_SHA}" # Sha used to create this branch -TEST_FOLDER='.automation/test' # Folder where test are stored -CLEAN_FOLDER='.automation/automation' # Folder to rename to prevent skip ((LOG_TRACE = LOG_DEBUG = LOG_VERBOSE = LOG_NOTICE = LOG_WARN = LOG_ERROR = "true")) # Enable all loging export LOG_TRACE LOG_DEBUG LOG_VERBOSE LOG_NOTICE LOG_WARN LOG_ERROR @@ -98,7 +96,7 @@ CleanTestDockerFiles() { ################## mapfile -t FIND_CMD < <( cd "${GITHUB_WORKSPACE}" || exit 1 - find "${GITHUB_WORKSPACE}" -type f -name "*Dockerfile" 2>&1 + find "${GITHUB_WORKSPACE}" -type f -name "*Dockerfile" -o -name "*.dockerignore" 2>&1 ) CheckShellErrors "ERROR! failed to get list of all file for Docker!" "ERROR:[${FIND_CMD[*]}]" @@ -145,22 +143,6 @@ CleanSHAFolder() { CheckShellErrors "ERROR! Failed to remove folder:[${GITHUB_SHA}]!" "ERROR:[${REMOVE_CMD}]" } ################################################################################ -#### Function RenameTestFolder ################################################# -RenameTestFolder() { - info "-------------------------------------------------------" - info "Need to rename [tests] folder as it will be ignored..." - - ##################### - # Rename the folder # - ##################### - RENAME_FOLDER_CMD=$( - cd "${GITHUB_WORKSPACE}" || exit 1 - mv "${TEST_FOLDER}" "${CLEAN_FOLDER}" 2>&1 - ) - - CheckShellErrors "ERROR! failed to move test folder!" "ERROR:[${RENAME_FOLDER_CMD[*]}]" -} -################################################################################ #### Function CleanPowershell ################################################## CleanPowershell() { # Need to remove the .psd1 templates as they are formally parsed, @@ -228,11 +210,6 @@ CleanTestDockerFiles ############################### CleanSHAFolder -################## -# Re Name folder # -################## -RenameTestFolder - ############################## # Clean Powershell templates # ############################## diff --git a/action.yml b/action.yml index 15a058d2..77eacd52 100644 --- a/action.yml +++ b/action.yml @@ -1,3 +1,4 @@ +--- name: 'Super-Linter' author: 'GitHub' description: 'It is a simple combination of various linters, written in bash, to help validate your source code.' diff --git a/lib/functions/buildFileList.sh b/lib/functions/buildFileList.sh index 79a1754e..460298f6 100755 --- a/lib/functions/buildFileList.sh +++ b/lib/functions/buildFileList.sh @@ -115,29 +115,8 @@ function BuildFileList() { # print header # ################ debug "----------------------------------------------" - debug "Populating the file list with all the files in the ${WORKSPACE_PATH} workspace" - mapfile -t RAW_FILE_ARRAY < <(find "${WORKSPACE_PATH}" \ - -not \( -path '*/\.git' -prune \) \ - -not \( -path '*/\.pytest_cache' -prune \) \ - -not \( -path '*/\.rbenv' -prune \) \ - -not \( -path '*/\.terragrunt-cache' -prune \) \ - -not \( -path '*/\.venv' -prune \) \ - -not \( -path '*/\__pycache__' -prune \) \ - -not \( -path '*/\node_modules' -prune \) \ - -not -name ".DS_Store" \ - -not -name "*.gif" \ - -not -name "*.ico" \ - -not -name "*.jpg" \ - -not -name "*.jpeg" \ - -not -name "*.pdf" \ - -not -name "*.png" \ - -not -name "*.webp" \ - -not -name "*.woff" \ - -not -name "*.woff2" \ - -not -name "*.zip" \ - -type f \ - 2>&1 | sort) - + debug "Populating the file list with:[git -C \"${WORKSPACE_PATH}\" ls-tree -r --name-only HEAD | xargs -I % sh -c \"echo ${WORKSPACE_PATH}/%\"]" + mapfile -t RAW_FILE_ARRAY < <(git -C "${WORKSPACE_PATH}" ls-tree -r --name-only HEAD | xargs -I % sh -c "echo ${WORKSPACE_PATH}/%" 2>&1) debug "RAW_FILE_ARRAY contents: ${RAW_FILE_ARRAY[*]}" fi