mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-22 14:58:08 +00:00
Merge pull request #4713 from pi-hole/new/code-spell
Add code-spell action / Move editorconfig-checker action to smoke-tests
This commit is contained in:
commit
17485023a2
3
.codespellignore
Normal file
3
.codespellignore
Normal file
@ -0,0 +1,3 @@
|
||||
doubleclick
|
||||
wan
|
||||
nwe
|
14
.github/workflows/editorconfig-checker.yml
vendored
14
.github/workflows/editorconfig-checker.yml
vendored
@ -1,14 +0,0 @@
|
||||
name: editorconfig-checker
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: editorconfig-checker
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: editorconfig-checker/action-editorconfig-checker@main
|
||||
- run: editorconfig-checker
|
21
.github/workflows/test.yml
vendored
21
.github/workflows/test.yml
vendored
@ -8,7 +8,7 @@ permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
smoke-test:
|
||||
smoke-tests:
|
||||
if: github.event.pull_request.draft == false
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@ -16,19 +16,30 @@ jobs:
|
||||
name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
-
|
||||
name: Run Smoke Tests
|
||||
name: Check scripts in repository are executable
|
||||
run: |
|
||||
# Ensure scripts in repository are executable
|
||||
IFS=$'\n';
|
||||
for f in $(find . -name '*.sh'); do if [[ ! -x $f ]]; then echo "$f is not executable" && FAIL=1; fi ;done
|
||||
unset IFS;
|
||||
# If FAIL is 1 then we fail.
|
||||
[[ $FAIL == 1 ]] && exit 1 || echo "Smoke Tests Passed"
|
||||
[[ $FAIL == 1 ]] && exit 1 || echo "Scripts are executable!"
|
||||
-
|
||||
name: Spell-Checking
|
||||
uses: codespell-project/actions-codespell@master
|
||||
with:
|
||||
ignore_words_file: .codespellignore
|
||||
-
|
||||
name: Get editorconfig-checker
|
||||
uses: editorconfig-checker/action-editorconfig-checker@main
|
||||
-
|
||||
name: Run editorconfig-checker
|
||||
run: editorconfig-checker
|
||||
|
||||
|
||||
distro-test:
|
||||
if: github.event.pull_request.draft == false
|
||||
runs-on: ubuntu-latest
|
||||
needs: smoke-test
|
||||
needs: smoke-tests
|
||||
strategy:
|
||||
matrix:
|
||||
distro: [debian_10, debian_11, ubuntu_18, ubuntu_20, ubuntu_21, ubuntu_22, centos_7, centos_8, fedora_34]
|
||||
|
@ -584,7 +584,7 @@ disk_usage() {
|
||||
# Additinal keywords can be added, separated by "|"
|
||||
hide="curlftpfs"
|
||||
|
||||
# only show those lines not containg a sensitive phrase
|
||||
# only show those lines not containing a sensitive phrase
|
||||
for line in "${file_system[@]}"; do
|
||||
if [[ ! $line =~ $hide ]]; then
|
||||
log_write " ${line}"
|
||||
|
@ -296,7 +296,7 @@ trust-anchor=.,20326,8,2,E06D44B80B8F1D39A95C0B0D7C65D08458E880409BBC68345710423
|
||||
# changes in the non-FQDN forwarding. This cannot be done in 01-pihole.conf
|
||||
# as we don't want to delete all local=/.../ lines so it's much safer to
|
||||
# simply rewrite the entire corresponding config file (which is what the
|
||||
# DHCP settings subroutie is doing)
|
||||
# DHCP settings subroutine is doing)
|
||||
ProcessDHCPSettings
|
||||
}
|
||||
|
||||
|
@ -507,7 +507,7 @@
|
||||
# (using /etc/hosts) then that name can be specified as the
|
||||
# tftp_servername (the third option to dhcp-boot) and in that
|
||||
# case dnsmasq resolves this name and returns the resultant IP
|
||||
# addresses in round robin fasion. This facility can be used to
|
||||
# addresses in round robin fashion. This facility can be used to
|
||||
# load balance the tftp load among a set of servers.
|
||||
#dhcp-boot=/var/ftpd/pxelinux.0,boothost,tftp_server_name
|
||||
|
||||
|
@ -195,7 +195,7 @@ os_check() {
|
||||
distro_part="${distro_and_versions%%=*}"
|
||||
versions_part="${distro_and_versions##*=}"
|
||||
|
||||
# If the distro part is a (case-insensistive) substring of the computer OS
|
||||
# If the distro part is a (case-insensitive) substring of the computer OS
|
||||
if [[ "${detected_os^^}" =~ ${distro_part^^} ]]; then
|
||||
valid_os=true
|
||||
IFS="," read -r -a supportedVer <<<"${versions_part}"
|
||||
@ -234,7 +234,7 @@ os_check() {
|
||||
printf " If you are seeing this message and you do have a supported OS, please contact support.\\n"
|
||||
fi
|
||||
printf "\\n"
|
||||
printf " %bhttps://docs.pi-hole.net/main/prerequesites/#supported-operating-systems%b\\n" "${COL_LIGHT_GREEN}" "${COL_NC}"
|
||||
printf " %bhttps://docs.pi-hole.net/main/prerequisites/#supported-operating-systems%b\\n" "${COL_LIGHT_GREEN}" "${COL_NC}"
|
||||
printf "\\n"
|
||||
printf " If you wish to attempt to continue anyway, you can try one of the following commands to skip this check:\\n"
|
||||
printf "\\n"
|
||||
@ -314,7 +314,7 @@ package_manager_detect() {
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
# Packages required to perfom the os_check (stored as an array)
|
||||
# Packages required to perform the os_check (stored as an array)
|
||||
OS_CHECK_DEPS=(grep dnsutils)
|
||||
# Packages required to run this install script (stored as an array)
|
||||
INSTALLER_DEPS=(git iproute2 whiptail ca-certificates)
|
||||
|
@ -540,7 +540,7 @@ parseList() {
|
||||
num_target_lines_new="$(grep -c "^" "${target}")"
|
||||
# Number of new correctly added lines
|
||||
num_correct_lines="$(( num_target_lines_new-num_target_lines ))"
|
||||
# Upate number of lines in target file
|
||||
# Update number of lines in target file
|
||||
num_target_lines="$num_target_lines_new"
|
||||
num_invalid="$(( num_source_lines-num_correct_lines ))"
|
||||
if [[ "${num_invalid}" -eq 0 ]]; then
|
||||
|
@ -150,7 +150,7 @@ def get_directories_recursive(host, directory):
|
||||
|
||||
def test_installPihole_fresh_install_readableFiles(host):
|
||||
'''
|
||||
confirms all neccessary files are readable by pihole user
|
||||
confirms all necessary files are readable by pihole user
|
||||
'''
|
||||
# Whiptail dialog returns Cancel for user prompt
|
||||
mock_command('whiptail', {'*': ('', '0')}, host)
|
||||
|
Loading…
Reference in New Issue
Block a user