@@ -158,3 +158,76 @@ jobs:
158158 with :
159159 token : ${{ secrets.CODECOV_TOKEN }}
160160 files : junit.xml
161+
162+ openshift-container-tests :
163+ name : " openshift: ${{ matrix.name }}"
164+ needs : find-images
165+ runs-on : ubuntu-26.04
166+ strategy :
167+ fail-fast : false
168+ matrix : ${{ fromJSON(needs.find-images.outputs.matrix) }}
169+ steps :
170+ - uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
171+ with :
172+ persist-credentials : false
173+
174+ - name : Install uv
175+ uses : astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
176+ with :
177+ version-file : pyproject.toml
178+ enable-cache : true
179+ cache-dependency-glob : " uv.lock"
180+
181+ - name : Install Python
182+ uses : actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
183+ with :
184+ python-version : " 3.14"
185+
186+ - name : Install deps
187+ run : uv sync --locked
188+
189+ # Rootful podman sharing image storage with cri-o, same as build-notebooks-TEMPLATE.yaml,
190+ # so the pod created by the openshift-marked tests can find the image without re-pulling.
191+ - name : Install and configure Podman
192+ uses : ' ./.github/actions/install-podman-action'
193+ with :
194+ platform : linux/amd64
195+
196+ - name : Provision K8s cluster
197+ uses : ./.github/actions/provision-k8s
198+
199+ - name : Login to GHCR
200+ uses : docker/login-action@371161bbe7024a29a25c5e19bfcbc0804fe9ad2c # v4.5.2
201+ with :
202+ registry : ghcr.io
203+ username : ${{ github.actor }}
204+ password : ${{ secrets.GITHUB_TOKEN }}
205+
206+ # install-podman-action's storage.conf enables zstd:chunked partial pulls, which
207+ # only matters for `podman build`'s own registry pulls elsewhere. Here we `podman
208+ # pull` an already-published ghcr.io image, and ghcr.io's blob endpoint returns
209+ # "501 Unsupported client range" for partial/ranged fetches, failing the pull
210+ # outright instead of falling back to a full one. Disable it for this job only.
211+ - name : Disable zstd:chunked partial image pulls
212+ run : sudo sed -i 's/enable_partial_images = "true"/enable_partial_images = "false"/' /etc/containers/storage.conf
213+
214+ - name : Pull and run OpenShift container tests
215+ env :
216+ TEST_IMAGE : ${{ matrix.image }}
217+ DOCKER_HOST : " unix:///var/run/podman/podman.sock"
218+ TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE : " /var/run/podman/podman.sock"
219+ run : |
220+ set -Eeuxo pipefail
221+ podman pull "${TEST_IMAGE}"
222+ uv run pytest --capture=fd tests/containers \
223+ -m 'openshift and not cuda and not rocm' \
224+ --image="${TEST_IMAGE}" \
225+ --junitxml=junit-openshift.xml \
226+ -v
227+
228+ - name : Upload test results
229+ if : ${{ !cancelled() }}
230+ uses : codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
231+ with :
232+ token : ${{ secrets.CODECOV_TOKEN }}
233+ files : junit-openshift.xml
0 commit comments