wads.scripts.run_ci_commands¶
Run the [tool.wads.ci.commands] pre_test / post_test lists in CI.
read_ci_config hands each list over as a JSON array (a GitHub Actions output); the
run-tests-uv action puts it in an environment variable and calls this script with
the variable’s name. Each command runs under bash -c (as wads ci-local runs it; Git Bash on Windows runners), in order, in the current
directory and environment (the venv is already activated), and the first failure stops
the run with its exit status. An empty or unset list does nothing. Stdlib only.
>>> run_commands(["echo hi"], run=lambda cmd, **kw: 0)
+ echo hi
0
>>> run_commands('["false", "echo unreachable"]', run=lambda cmd, **kw: 1 if cmd == "false" else 0)
+ false
1
Module Attributes
The environment variable naming the bash to use. |
Functions
|
|
|
Run |
- wads.scripts.run_ci_commands.BASH_ENV_VAR = 'WADS_BASH'¶
The environment variable naming the bash to use. The action sets it from
$BASH: on Windows runners a barebashresolves to System32’s WSL launcher, not Git Bash.