Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ fi
echo
echo "# Pulp config:"
tail -v -n +1 .ci/ansible/settings/settings.*
{%- if test_cli %}

echo
echo "# Pulp CLI config"
tail -v -n +1 "../{{ cli_package }}/tests/cli.toml"
{%- endif %}

echo
echo "# Containerfile:"
Expand Down
2 changes: 1 addition & 1 deletion templates/github/.github/workflows/scripts/install.sh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ git clone --depth 1 --branch "$PULP_CLI_VERSION" {{ cli_repo }} ../{{ cli_packag
PULP_API_ROOT="$(yq -r '.pulp_scenario_settings.api_root // .pulp_settings.api_root // "/pulp/"' < .ci/ansible/vars/main.yaml)"

pulp config create --base-url {{ pulp_scheme }}://pulp{% if pulp_scheme != 'https' %} --no-verify-ssl{% endif %} --api-root "${PULP_API_ROOT}" --username "admin" --password "password"
{% if test_cli -%}
{%- if test_cli %}
cp ~/.config/pulp/cli.toml "../{{ cli_package }}/tests/cli.toml"
{%- endif %}

Expand Down
11 changes: 8 additions & 3 deletions templates/github/.github/workflows/scripts/script.sh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,17 @@ fi
{%- if test_cli %}
{%- if docker_fixtures %}
export PULP_FIXTURES_URL="http://pulp-fixtures:8080"
{%- endif %}
# some pulp-cli tests use the api root envvar
export PULP_API_ROOT="$(EDITOR=cat pulp config edit 2>/dev/null | awk -F'"' '/api_root/{print $2; exit}')"
{%- endif %}
pushd ../{{ cli_package }}
pip install -r test_requirements.txt
pytest -v tests -m "{{ plugins | map(attribute='name') | join(' or ') | snake }}"
if [[ -f "test_requirements.txt" ]]
then
pip install -r test_requirements.txt
pytest -v tests -m "{{ plugins | map(attribute='name') | join(' or ') | snake }}"
else
PULP_CA_BUNDLE="/usr/local/share/ca-certificates/pulp_webserver.crt" make livetest
fi
popd
{%- endif %}
{%- endif %}
Expand Down
3 changes: 3 additions & 0 deletions templates/github/.github/workflows/test.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
checkout,
display_logs,
install_python_deps,
install_uv,
run_script,
setup_env,
setup_python,
Expand Down Expand Up @@ -37,6 +38,8 @@ jobs:

{{ setup_python() | indent(6) }}

{{ install_uv() | indent(6) }}

- name: "Download plugin package"
uses: "actions/download-artifact@v8"
with:
Expand Down
8 changes: 8 additions & 0 deletions templates/include/macros.j2
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ GITHUB_CONTEXT: "{{ '${{ github.event.pull_request.commits_url }}' }}"
{%- endmacro -%}


{%- macro install_uv() -%}
- name: "Install uv"
uses: "astral-sh/setup-uv@v7"
with:
enable-cache: true
{%- endmacro -%}


{%- macro setup_ruby(condition=None) -%}
- uses: ruby/setup-ruby@v1
{%- if condition %}
Expand Down