diff --git a/README.md b/README.md index 5472957b..afb93a78 100644 --- a/README.md +++ b/README.md @@ -105,6 +105,9 @@ The following settings are stored in `template_config.yml`. docs_test Include a CI build for testing the 'make html' command for sphinx docs. + os_required_packages A list of packages to be installed on the host OS (Ubuntu) in the build + step. + parallel_test_workers Run tests in parallel using `pytest-xdist` with N parallel runners. This settings specifies N. By default it is 8. diff --git a/plugin-template b/plugin-template index aa059193..53fd9f4d 100755 --- a/plugin-template +++ b/plugin-template @@ -46,6 +46,7 @@ DEFAULT_SETTINGS = { "latest_release_branch": None, "lint_requirements": True, "noissue_marker": "[noissue]", + "os_required_packages": [], "parallel_test_workers": 8, "plugin_app_label": None, "plugin_default_branch": "main", diff --git a/templates/github/.github/workflows/build.yml.j2 b/templates/github/.github/workflows/build.yml.j2 index 69772eb2..88b16588 100644 --- a/templates/github/.github/workflows/build.yml.j2 +++ b/templates/github/.github/workflows/build.yml.j2 @@ -23,6 +23,11 @@ jobs: {{ checkout(repository="pulp/pulp-openapi-generator", path="pulp-openapi-generator") | indent(6) }} {{ setup_python() | indent(6) }} {{ install_python_deps(["packaging", "twine", "wheel", "mkdocs", "jq"]) | indent(6) }} + {%- if os_required_packages %} + - name: "Install OS packages" + run: | + sudo apt-get install -y {{ os_required_packages|join(' ') }} + {%- endif %} - name: "Build package" run: | python3 setup.py sdist bdist_wheel --python-tag py3