Skip to content
Open
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
8 changes: 3 additions & 5 deletions .ci/ansible/Containerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ ADD ./{{ item.origin }} {{ item.destination }}
{%- endfor %}

# This MUST be the ONLY call to pip install in inside the container.
RUN pip3 install --upgrade pip setuptools wheel && \
rm -rf /root/.cache/pip && \
pip3 install {{ image.source }}
RUN --mount=type=cache,target=/root/.cache/uv uv pip install --upgrade setuptools wheel && \
uv pip install {{ image.source }}
{%- if image.upperbounds | default(false) -%}
{{ " " }}-c ./{{ plugin_name }}/upperbounds_constraints.txt
{%- endif -%}
Expand All @@ -22,8 +21,7 @@ RUN pip3 install --upgrade pip setuptools wheel && \
{%- if image.ci_requirements | default(false) -%}
{{ " " }}-r ./{{ plugin_name }}/ci_requirements.txt
{%- endif -%}
{{ " " }}-c ./{{ plugin_name }}/.ci/assets/ci_constraints.txt && \
rm -rf /root/.cache/pip
{{ " " }}-c ./{{ plugin_name }}/.ci/assets/ci_constraints.txt

{% if pulp_env is defined and pulp_env %}
{% for key, value in pulp_env.items() %}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/scripts/before_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ echo
echo "# Pulp config:"
tail -v -n +1 .ci/ansible/settings/settings.*

echo
echo "# Pulp CLI config"
tail -v -n +1 "../pulp-cli/tests/cli.toml"

echo
echo "# Containerfile:"
tail -v -n +1 .ci/ansible/Containerfile
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/scripts/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,16 @@ else
cmd_user_prefix bash -c "pytest -v --timeout=300 -r sx --color=yes --suppress-no-test-exit-code --durations=20 --pyargs pulp_python.tests.functional -m 'not parallel'"
fi
fi
# 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}')"
pushd ../pulp-cli
pip install -r test_requirements.txt
pytest -v tests -m "pulp_python"
if [[ -f "test_requirements.txt" ]]
then
pip install -r test_requirements.txt
pytest -v tests -m "pulp_python"
else
PULP_CA_BUNDLE="/usr/local/share/ca-certificates/pulp_webserver.crt" make livetest
fi
popd

if [ -f "$POST_SCRIPT" ]; then
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ jobs:
with:
python-version: "3.11"

- name: "Install uv"
uses: "astral-sh/setup-uv@v7"
with:
enable-cache: true

- name: "Download plugin package"
uses: "actions/download-artifact@v8"
with:
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ extend-select = [

[tool.ruff.lint.flake8-tidy-imports.banned-api]
# This section is managed by the plugin template. Do not edit manually.
"distutils".msg = "The 'distutils' module has been deprecated since Python 3.9."
"pulpcore.app".msg = "The 'pulpcore' apis must only be consumed via 'pulpcore.plugin'."

[tool.ruff.lint.isort]
Expand Down
Loading