Skip to content

Commit

Permalink
Utilities: Mypy type checking
Browse files Browse the repository at this point in the history
Enforce mypy type checking on `Utilities/repeat_command` via the
`Utilities/build-using-self` script, which is executed in the self-hosted
CI pipelines.
  • Loading branch information
bkhouri committed Jan 17, 2025
1 parent d640fc7 commit cc9ac5e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Utilities/build-using-self
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@ root_dir="$(cd ${__dir}/.. && pwd)"
cd "${root_dir}/"
echo "Current directory is ${PWD}"

# Check python typing
python_bin=$(command -v python3)
VENV_PATH=$(mktemp -d)
$python_bin -m venv "${VENV_PATH}"
source "${VENV_PATH}"/bin/activate
pip3 install --requirement "${__dir}"/python/requirement.txt

mypy --strict Utilities/repeat_command


## Actual pipelinw
CONFIGURATION=debug
export SWIFTCI_IS_SELF_HOSTED=1

Expand Down
1 change: 1 addition & 0 deletions Utilities/python/requirement.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mypy==1.14.1
1 change: 1 addition & 0 deletions Utilities/repeat_command
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ class CommandsRepeater:
logging.info("-" * 100)
logging.info("Root Log Directory : %s", self.config.logs_path.resolve())
logging.info("Failed Log Directory: %s", self.failed_logs_path.resolve())
return True


def main() -> None:
Expand Down

0 comments on commit cc9ac5e

Please sign in to comment.