diff --git a/.ci/ansible/Containerfile.j2 b/.ci/ansible/Containerfile.j2 index a446f339..13b5ff05 100644 --- a/.ci/ansible/Containerfile.j2 +++ b/.ci/ansible/Containerfile.j2 @@ -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 -%} @@ -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() %} diff --git a/.github/workflows/scripts/before_script.sh b/.github/workflows/scripts/before_script.sh index 13809a87..cf24c186 100755 --- a/.github/workflows/scripts/before_script.sh +++ b/.github/workflows/scripts/before_script.sh @@ -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 diff --git a/.github/workflows/scripts/script.sh b/.github/workflows/scripts/script.sh index 5a4910e3..139ca45e 100755 --- a/.github/workflows/scripts/script.sh +++ b/.github/workflows/scripts/script.sh @@ -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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 00d2c3ec..bbe184af 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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: diff --git a/pyproject.toml b/pyproject.toml index f9262825..de27f224 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -148,6 +148,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]