-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(python): upgrade workflow to v4.0
- Loading branch information
Showing
9 changed files
with
340 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
# | ||
# .github/citools/python/python-lint-bandit | ||
# | ||
|
||
# shellcheck disable=SC1091 | ||
source ../../.github/citools/includes/wrapper-library || exit | ||
|
||
declare -i retval=0 | ||
|
||
main() { | ||
printf "\nRunning Python Lint - Bandit\n\n" | ||
|
||
show_tool_versions_python_short | ||
|
||
print_ruler | ||
|
||
run_command bandit --version | ||
|
||
print_ruler | ||
|
||
# shellcheck disable=SC2048,SC2068,SC2086 | ||
run_command bandit ${@:---verbose --recursive ./src} | ||
|
||
print_ruler | ||
|
||
echo Exit code: "${retval}" | ||
return "${retval}" | ||
} | ||
|
||
time main "${@}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
# | ||
# .github/citools/python/python-lint-pyright | ||
# | ||
|
||
# shellcheck disable=SC1091 | ||
source ../../.github/citools/includes/wrapper-library || exit | ||
|
||
declare -i retval=0 | ||
|
||
main() { | ||
printf "\nRunning Python Lint - PyRight\n\n" | ||
|
||
show_tool_versions_python_short | ||
|
||
print_ruler | ||
|
||
run_command pyright --version | ||
|
||
print_ruler | ||
|
||
# shellcheck disable=SC2048,SC2068,SC2086 | ||
run_command pyright ${@:---stats ./src} | ||
|
||
print_ruler | ||
|
||
echo Exit code: "${retval}" | ||
return "${retval}" | ||
} | ||
|
||
time main "${@}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
# | ||
# .github/citools/python/python-lint-refurb | ||
# | ||
|
||
# shellcheck disable=SC1091 | ||
source ../../.github/citools/includes/wrapper-library || exit | ||
|
||
declare -i retval=0 | ||
|
||
main() { | ||
printf "\nRunning Python Lint - Refurb\n\n" | ||
|
||
show_tool_versions_python_short | ||
|
||
print_ruler | ||
|
||
run_command refurb --version | ||
|
||
print_ruler | ||
|
||
# shellcheck disable=SC2048,SC2068,SC2086 | ||
run_command refurb ${@:-./src} | ||
|
||
print_ruler | ||
|
||
echo Exit code: "${retval}" | ||
return "${retval}" | ||
} | ||
|
||
time main "${@}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
# | ||
# .github/citools/python/python-lint-ruff | ||
# | ||
|
||
# shellcheck disable=SC1091 | ||
source ../../.github/citools/includes/wrapper-library || exit | ||
|
||
declare -i retval=0 | ||
|
||
main() { | ||
printf "\nRunning Python Lint - Ruff\n\n" | ||
|
||
show_tool_versions_python_short | ||
|
||
print_ruler | ||
|
||
run_command ruff --version | ||
|
||
print_ruler | ||
|
||
# shellcheck disable=SC2048,SC2068,SC2086 | ||
run_command ruff ${@:-check --ignore E501 ./src} | ||
|
||
print_ruler | ||
|
||
echo Exit code: "${retval}" | ||
return "${retval}" | ||
} | ||
|
||
time main "${@}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
# | ||
# .github/citools/python/python-test-doctest | ||
# | ||
|
||
# shellcheck disable=SC1091 | ||
source ../../.github/citools/includes/wrapper-library || exit | ||
|
||
declare -i retval=0 | ||
|
||
main() { | ||
printf "\nRunning Python DocTests\n\n" | ||
|
||
show_tool_versions_python_short | ||
|
||
print_ruler | ||
|
||
export PYTHONPATH="./src" | ||
printf "PYTHONPATH=\"%s\"\n" "${PYTHONPATH}" | ||
|
||
print_ruler | ||
|
||
# shellcheck disable=SC2048,SC2068,SC2086 | ||
run_command python -m doctest ${@:--v ./src/*/*.py} | ||
|
||
print_ruler | ||
|
||
echo Exit code: "${retval}" | ||
return "${retval}" | ||
} | ||
|
||
time main "${@}" |
Oops, something went wrong.