Skip to content

Commit c886bb0

Browse files
committed
Update CI files
1 parent 6573762 commit c886bb0

5 files changed

Lines changed: 22 additions & 7 deletions

File tree

.ci/ansible/Containerfile.j2

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ ADD ./{{ item.origin }} {{ item.destination }}
1010
{%- endfor %}
1111

1212
# This MUST be the ONLY call to pip install in inside the container.
13-
RUN pip3 install --upgrade pip setuptools wheel && \
14-
rm -rf /root/.cache/pip && \
15-
pip3 install {{ image.source }}
13+
RUN --mount=type=cache,target=/root/.cache/uv uv pip install --upgrade setuptools wheel && \
14+
uv pip install {{ image.source }}
1615
{%- if image.upperbounds | default(false) -%}
1716
{{ " " }}-c ./{{ plugin_name }}/upperbounds_constraints.txt
1817
{%- endif -%}
@@ -22,8 +21,7 @@ RUN pip3 install --upgrade pip setuptools wheel && \
2221
{%- if image.ci_requirements | default(false) -%}
2322
{{ " " }}-r ./{{ plugin_name }}/ci_requirements.txt
2423
{%- endif -%}
25-
{{ " " }}-c ./{{ plugin_name }}/.ci/assets/ci_constraints.txt && \
26-
rm -rf /root/.cache/pip
24+
{{ " " }}-c ./{{ plugin_name }}/.ci/assets/ci_constraints.txt
2725

2826
{% if pulp_env is defined and pulp_env %}
2927
{% for key, value in pulp_env.items() %}

.github/workflows/scripts/before_script.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ echo
2525
echo "# Pulp config:"
2626
tail -v -n +1 .ci/ansible/settings/settings.*
2727

28+
echo
29+
echo "# Pulp CLI config"
30+
tail -v -n +1 "../pulp-cli/tests/cli.toml"
31+
2832
echo
2933
echo "# Containerfile:"
3034
tail -v -n +1 .ci/ansible/Containerfile

.github/workflows/scripts/script.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,16 @@ else
142142
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'"
143143
fi
144144
fi
145+
# some pulp-cli tests use the api root envvar
146+
export PULP_API_ROOT="$(EDITOR=cat pulp config edit 2>/dev/null | awk -F'"' '/api_root/{print $2; exit}')"
145147
pushd ../pulp-cli
146-
pip install -r test_requirements.txt
147-
pytest -v tests -m "pulp_python"
148+
if [[ -f "test_requirements.txt" ]]
149+
then
150+
pip install -r test_requirements.txt
151+
pytest -v tests -m "pulp_python"
152+
else
153+
PULP_CA_BUNDLE="/usr/local/share/ca-certificates/pulp_webserver.crt" make livetest
154+
fi
148155
popd
149156

150157
if [ -f "$POST_SCRIPT" ]; then

.github/workflows/test.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ jobs:
4242
with:
4343
python-version: "3.11"
4444

45+
- name: "Install uv"
46+
uses: "astral-sh/setup-uv@v7"
47+
with:
48+
enable-cache: true
49+
4550
- name: "Download plugin package"
4651
uses: "actions/download-artifact@v8"
4752
with:

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ extend-select = [
147147

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

152153
[tool.ruff.lint.isort]

0 commit comments

Comments
 (0)