Skip to content

Commit 30df0fe

Browse files
committed
test(conformance): verify Snap status in Ubuntu VM
Signed-off-by: Evan Lezar <elezar@nvidia.com>
1 parent f50a1e1 commit 30df0fe

2 files changed

Lines changed: 61 additions & 2 deletions

File tree

‎.github/workflows/conformance.yml‎

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,3 +281,56 @@ jobs:
281281
--copy "$guest_script:/tmp/conformance.sh" \
282282
--copy conformance-input/openshell-conformance:/tmp/openshell-conformance \
283283
-- bash /tmp/conformance.sh
284+
285+
ubuntu-snap:
286+
name: Ubuntu Snap with Docker Snap (${{ needs.target.outputs.arch }})
287+
needs: [build-snap, target]
288+
runs-on: ${{ needs.target.outputs.test_runner }}
289+
timeout-minutes: 45
290+
permissions:
291+
actions: read
292+
contents: read
293+
steps:
294+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
295+
with:
296+
persist-credentials: false
297+
298+
- name: Enable KVM access
299+
run: |
300+
set -euo pipefail
301+
if [[ ! -c /dev/kvm ]]; then
302+
echo "::error::The runner did not expose /dev/kvm"
303+
exit 1
304+
fi
305+
sudo chmod 0666 /dev/kvm
306+
exec 3<>/dev/kvm
307+
exec 3>&-
308+
309+
- uses: ./.github/actions/setup-nix
310+
311+
- name: Download Snap artifact
312+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
313+
with:
314+
name: snap-linux-${{ needs.target.outputs.arch }}
315+
path: snap-input
316+
317+
- name: Install Snap and verify gateway status
318+
shell: bash
319+
run: |
320+
set -euo pipefail
321+
shopt -s nullglob
322+
snaps=(snap-input/*.snap)
323+
if [[ ${#snaps[@]} -ne 1 ]]; then
324+
echo "expected one Snap artifact" >&2
325+
printf 'Snap artifacts:\n' >&2
326+
printf ' %s\n' snap-input/* >&2
327+
exit 1
328+
fi
329+
330+
OPENSHELL_TEST_GUEST_CACHE_DISABLE=1 nix run .#test-guest -- \
331+
--distro ubuntu-24-04 \
332+
--with snapd \
333+
--with docker-snap \
334+
--copy "${snaps[0]}:/var/lib/openshell-conformance/candidate/openshell.snap" \
335+
--provision openshell-snap \
336+
-- true

‎architecture/build.md‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,14 @@ its compatibility metadata as a custom OCI artifact. Normal test runs ensure
253253
the exact local entry exists, invoking the cache builder automatically on a
254254
miss before booting a disposable overlay. The separate cache app owns OCI
255255
pulls and explicit publication. OCI pulls require a trusted manifest digest
256-
and retain that provenance with the local entry; mutable tags are used only
257-
for explicit publication.
256+
and retain that provenance with the local entry; mutable tags are used only
257+
for explicit publication.
258+
259+
The conformance workflow also builds a branch Snap for an Ubuntu QEMU guest.
260+
The guest installs snapd and Docker Snap, installs the unsigned candidate,
261+
connects its required interfaces, registers the local gateway, and verifies
262+
`openshell status`. Sandbox smoke conformance remains separate from this
263+
package-installation check.
258264

259265
## Python Wheel Packaging
260266

0 commit comments

Comments
 (0)