Skip to content

Commit b5a2e60

Browse files
committed
Upgrade to V3 of CI base image.
1 parent b1620da commit b5a2e60

File tree

5 files changed

+17
-22
lines changed

5 files changed

+17
-22
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- id: details
3232
uses: kpfleming/composite-actions/image-details@v2
3333
with:
34-
base_image: python:bookworm-main
34+
base_image: python:v3-bookworm-main
3535
- id: preflight
3636
uses: kpfleming/composite-actions/ci-preflight@v2
3737
with:

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
run: hatch build -t wheel
2929
shell: bash
3030
- name: install project
31-
run: hatch run ci.py${{ inputs.python }}:pip install dist/*.whl
31+
run: hatch run ci.py${{ inputs.python }}:uv pip install dist/*.whl
3232
shell: bash
3333
- name: run tests
3434
run: hatch run ci.py${{ inputs.python }}:ci

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ packages = [
8080

8181
[tool.hatch.envs.default]
8282
python = "3.12"
83+
installer = "uv"
84+
python-sources = [
85+
"external",
86+
]
8387

8488
[tool.hatch.envs.lint]
8589
dependencies = [
@@ -122,7 +126,6 @@ python = [
122126
"3.10",
123127
"3.11",
124128
"3.12",
125-
"3.13",
126129
]
127130

128131
[tool.hatch.envs.ci.scripts]

workflow-support/make_ci_image.sh

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,10 @@ image_name=${1}; shift
1919
dist_name=${1}; shift
2020

2121
lint_deps=(shellcheck)
22-
proj_deps=(libsqlite3-0)
23-
proj_build_deps=(build-essential libc6-dev pkg-config)
22+
proj_deps=()
23+
proj_build_deps=()
2424

2525
hatchenvs=(lint ci)
26-
cimatrix=(3.8 3.9 3.10 3.11 3.12 3.13)
2726

2827
c=$(buildah from "${base_image}")
2928

@@ -41,27 +40,20 @@ build_cmd apt install --yes --quiet=2 "${lint_deps[@]}" "${proj_deps[@]}" "${pro
4140
for env in "${hatchenvs[@]}"; do
4241
# this looks weird... but it causes Hatch to create the env,
4342
# install all of the project's dependencies and the project,
44-
# then runs pip to uninstall the project, leaving the env
43+
# then runs 'uv pip' to uninstall the project, leaving the env
4544
# in place with the dependencies
46-
case "${env}" in
47-
ci*)
48-
for py in "${cimatrix[@]}"; do
49-
build_cmd_with_source hatch env create "${env}.py${py}"
50-
build_cmd_with_source hatch -e "${env}.py${py}" run pip uninstall --yes "${dist_name}"
51-
done
52-
;;
53-
*)
54-
build_cmd_with_source hatch env create "${env}"
55-
build_cmd_with_source hatch -e "${env}" run pip uninstall --yes "${dist_name}"
56-
;;
57-
esac
45+
build_cmd_with_source hatch env create "${env}"
46+
build_cmd_with_source hatch -e "${env}" run uv pip uninstall "${dist_name}"
5847
done
5948

60-
build_cmd apt remove --yes --purge "${proj_build_deps[@]}"
49+
if [ -n "${proj_build_deps[*]}" ]
50+
then
51+
build_cmd apt remove --yes --purge "${proj_build_deps[@]}"
52+
fi
6153
build_cmd apt autoremove --yes --purge
6254
build_cmd apt clean autoclean
6355
build_cmd sh -c "rm -rf /var/lib/apt/lists/*"
64-
build_cmd rm -rf /root/.cache
56+
build_cmd uv cache clean
6557

6658
if buildah images --quiet "${image_name}"; then
6759
buildah rmi "${image_name}"

workflow-support/versions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
versions={"python": ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]}
1+
versions={"python": ["3.8", "3.9", "3.10", "3.11", "3.12"]}

0 commit comments

Comments
 (0)