mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 19:01:54 +00:00
The unit suites had to install their toolchain on every run. The image now carries the interpreters, so the make prerequisite finds them present. The Composer vendor tree deliberately stays out of the image build: the package cache is reached through the compose extra_hosts mapping, which only exists for a running container, so a build-time composer install would bypass the cache and talk to packagist directly. Fetching it from the test target keeps it on the cached path.
21 lines
544 B
Python
21 lines
544 B
Python
"""Interpreter provisioning for the unit suites, baked into the image."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from utils.install.php import ensure_php_toolchain
|
|
from utils.install.ruby import ensure_ruby_present
|
|
|
|
|
|
def ensure_interpreters_present() -> None:
|
|
"""Install the interpreters the PHP and Ruby unit suites run on.
|
|
|
|
Raises:
|
|
RuntimeError: an interpreter is still absent after the install attempt.
|
|
"""
|
|
ensure_php_toolchain()
|
|
ensure_ruby_present()
|
|
|
|
|
|
if __name__ == "__main__":
|
|
ensure_interpreters_present()
|