Skip to content

Commit c2b22e2

Browse files
ci(tests): run testkit suites on tmachine from a reusable E2E Suites workflow
Add a reusable workflow with an explicit matrix: each row names a tmachine environment and installer, a family and package, and the runner label. Each row runs `nix run .#openshell-test-runner` once. The jobs use the same integration inputs as the existing tmachine lanes, cache the tmachine disks keyed on the Ansible tree, upload the JUnit report and logs whether or not the run passes, and an aggregator job reports the overall result. The only row runs the conformance sandbox suite on amd64 Ubuntu with rootful Docker and the Debian package, which CI can provision today. Branch E2E calls the workflow when the test:e2e label is set. The job is not in the Core E2E result's needs yet, so it starts out advisory. The existing conformance, feature and driver lanes are unchanged. Modeled on the E2E Suites workflow in #4629. Co-authored-by: Evan Lezar <elezar@nvidia.com> Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
1 parent 110cc08 commit c2b22e2

3 files changed

Lines changed: 146 additions & 0 deletions

File tree

‎.agents/skills/watch-github-actions/SKILL.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ gh run list --json databaseId,status,headBranch,url --jq '.[] | {id: .databaseId
127127

128128
For tmachine Kubernetes conformance failures, inspect the `tmachine-diagnostics-*` artifact. The K3s report includes Agent Sandbox controller state, leader leases, events, and current and previous controller logs. The conformance playbook checks reconciliation after guest boot with a temporary scheduling-gated Sandbox probe before running tests. Distinguish a failed controller probe from a failed conformance scenario; gateway connectivity and controller Deployment availability do not prove reconciliation works.
129129

130+
For the `e2e-suites` lane (`.github/workflows/e2e-suites.yml`), the last lines of the job log give the runner's result: PASS, FAIL with the failed tests, or ERROR with the step that broke. Then inspect the `e2e-results-<family>-<package>-<environment>-<installer>` artifact, which holds `junit.xml`, `nextest.log` and, after a failure, the guest's `diagnostics/`.
131+
130132
`Pre-release` temporarily omits Codex Security from its `Security Scan` job.
131133
`Release` uses the passing prerelease qualification result. Other scanners and
132134
qualification gates still run. Use the standalone

‎.github/workflows/branch-e2e.yml‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,21 @@ jobs:
303303
{"environment":"fedora-podman-rootless","installer":"binaries","testsuite":"driver-podman"}
304304
]
305305
306+
# Run the testkit suites in tests/suites/ on tmachine. The environments and
307+
# suites are listed in e2e-suites.yml. Not yet in core-e2e-result.needs: it
308+
# starts out advisory.
309+
e2e-suites:
310+
needs: [pr_metadata, prepare-integration]
311+
if: needs.pr_metadata.outputs.should_run == 'true' && needs.pr_metadata.outputs.run_core_e2e == 'true'
312+
permissions:
313+
actions: read
314+
contents: read
315+
packages: read
316+
uses: ./.github/workflows/e2e-suites.yml
317+
with:
318+
source-sha: ${{ needs.prepare-integration.outputs.source_sha }}
319+
integration-inputs-artifact-id: ${{ needs.prepare-integration.outputs.integration_inputs_artifact_id }}
320+
306321
docker-e2e:
307322
needs: [pr_metadata, build-binaries, build-images]
308323
if: needs.pr_metadata.outputs.should_run == 'true' && needs.pr_metadata.outputs.run_core_e2e == 'true'

‎.github/workflows/e2e-suites.yml‎

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
# Runs testkit suites in tmachine environments on CI. Each matrix row names a
5+
# tmachine environment and installer, the family (a workspace under
6+
# tests/suites/) and the package in it, and the runner label for the
7+
# environment's architecture. `openshell-test-runner` builds the tests, boots
8+
# the environment, runs them inside it and checks the results.
9+
#
10+
# Modeled on the E2E Suites workflow in NVIDIA/OpenShell#4629 by Evan Lezar.
11+
12+
name: E2E Suites
13+
14+
on:
15+
workflow_call:
16+
inputs:
17+
source-sha:
18+
description: Source revision of the prepared candidate artifacts
19+
required: true
20+
type: string
21+
integration-inputs-artifact-id:
22+
description: Immutable ID of the prepared integration inputs artifact
23+
required: true
24+
type: string
25+
26+
permissions:
27+
actions: read
28+
contents: read
29+
packages: read
30+
31+
# github.workflow is the caller's name here, so scope the group to this
32+
# workflow to avoid colliding with (and cancelling) the caller's other jobs.
33+
concurrency:
34+
group: ${{ github.workflow }}-e2e-suites-${{ github.ref }}
35+
cancel-in-progress: true
36+
37+
jobs:
38+
suites:
39+
name: E2E suites (${{ matrix.family }}/${{ matrix.package }}, ${{ matrix.environment }}, ${{ matrix.installer }})
40+
strategy:
41+
fail-fast: false
42+
matrix:
43+
include:
44+
# Only amd64 for now: CI has no arm64 runner with KVM for tmachine,
45+
# and the caller only builds amd64 inputs.
46+
- environment: ubuntu-docker-rootful
47+
installer: deb
48+
family: conformance
49+
package: sandbox
50+
runner: ubuntu-24.04
51+
runs-on: ${{ matrix.runner }}
52+
timeout-minutes: 90
53+
steps:
54+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
55+
with:
56+
ref: ${{ inputs['source-sha'] }}
57+
persist-credentials: false
58+
59+
- name: Enable KVM access
60+
run: |
61+
set -euo pipefail
62+
if [[ ! -c /dev/kvm ]]; then
63+
echo "::error::The runner did not expose /dev/kvm"
64+
exit 1
65+
fi
66+
sudo chmod 0666 /dev/kvm
67+
exec 3<>/dev/kvm
68+
exec 3>&-
69+
70+
- uses: ./.github/actions/setup-nix
71+
72+
- name: Cache tmachine disks
73+
uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 # v5.1.0
74+
with:
75+
path: ~/.cache/tmachine
76+
# tmachine keys its disk layers on a hash of the Ansible tree.
77+
# actions/cache doesn't save after an exact key hit, so a fixed key
78+
# would rebuild the changed layers on every run. Key on the playbooks
79+
# and fall back to the newest entry for the same runner.
80+
key: tmachine-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('tests/tmachine/ansible/**', 'tests/tmachine/images.nix') }}
81+
restore-keys: |
82+
tmachine-${{ runner.os }}-${{ runner.arch }}-
83+
84+
- name: Download integration inputs
85+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
86+
with:
87+
artifact-ids: ${{ inputs['integration-inputs-artifact-id'] }}
88+
path: artifacts
89+
90+
- name: Run the suites in this environment
91+
env:
92+
ENVIRONMENT: ${{ matrix.environment }}
93+
INSTALLER: ${{ matrix.installer }}
94+
FAMILY: ${{ matrix.family }}
95+
PACKAGE: ${{ matrix.package }}
96+
run: |
97+
# Retry dependency preparation, then run the suites once. The runner
98+
# builds the suites for the guest, so it needs no prepared archives.
99+
nix build --no-link .#openshell-test-runner || nix build --no-link .#openshell-test-runner
100+
nix run .#openshell-test-runner -- \
101+
--environment "${ENVIRONMENT}" \
102+
--installer "${INSTALLER}" \
103+
--family "${FAMILY}" \
104+
--package "${PACKAGE}" \
105+
--results artifacts/test-results
106+
107+
# The results directory holds the JUnit report (junit.xml), the nextest
108+
# log, and the guest's diagnostics when the run failed.
109+
- name: Upload results
110+
if: always()
111+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
112+
with:
113+
name: e2e-results-${{ matrix.family }}-${{ matrix.package }}-${{ matrix.environment }}-${{ matrix.installer }}
114+
path: artifacts/test-results
115+
if-no-files-found: ignore
116+
retention-days: 7
117+
118+
result:
119+
name: E2E suites result
120+
needs: [suites]
121+
if: always()
122+
runs-on: ubuntu-24.04
123+
steps:
124+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
125+
with:
126+
persist-credentials: false
127+
- uses: ./.github/actions/check-job-results
128+
with:
129+
results: ${{ toJSON(needs) }}

0 commit comments

Comments
 (0)