11name : E2E Test
22
33on :
4+ workflow_dispatch :
5+ inputs :
6+ image-tag :
7+ description : " Image tag to test (typically the commit SHA)"
8+ required : false
9+ type : string
10+ default : " "
11+ runner :
12+ description : " GitHub Actions runner label"
13+ required : false
14+ type : string
15+ default : " build-amd64"
16+ suite :
17+ description : " E2E suite to run"
18+ required : false
19+ type : choice
20+ default : all
21+ options :
22+ - all
23+ - python
24+ - rust
25+ - gateway-resume
26+ - python-gpu
427 workflow_call :
528 inputs :
629 image-tag :
1235 required : false
1336 type : string
1437 default : " build-amd64"
38+ suite :
39+ description : " E2E suite to run"
40+ required : false
41+ type : string
42+ default : " all"
1543
1644permissions :
1745 contents : read
@@ -20,6 +48,7 @@ permissions:
2048jobs :
2149 e2e :
2250 name : " E2E (${{ matrix.suite }})"
51+ if : ${{ inputs.suite == 'all' || inputs.suite == matrix.suite }}
2352 runs-on : ${{ inputs.runner }}
2453 timeout-minutes : 30
2554 strategy :
@@ -29,15 +58,23 @@ jobs:
2958 - suite : python
3059 cluster : e2e-python
3160 port : " 8080"
61+ cluster_gpu : " 0"
3262 cmd : " mise run --no-prepare --skip-deps e2e:python"
3363 - suite : rust
3464 cluster : e2e-rust
3565 port : " 8081"
66+ cluster_gpu : " 0"
3667 cmd : " mise run --no-prepare --skip-deps e2e:rust"
3768 - suite : gateway-resume
3869 cluster : e2e-resume
3970 port : " 8082"
71+ cluster_gpu : " 0"
4072 cmd : " cargo test --manifest-path e2e/rust/Cargo.toml --features e2e --test gateway_resume"
73+ - suite : python-gpu
74+ cluster : e2e-gpu
75+ port : " 8083"
76+ cluster_gpu : " 1"
77+ cmd : " mise run --no-prepare --skip-deps e2e:python:gpu"
4178 container :
4279 image : ghcr.io/nvidia/openshell/ci:latest
4380 credentials :
4885 - /var/run/docker.sock:/var/run/docker.sock
4986 env :
5087 MISE_GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
51- IMAGE_TAG : ${{ inputs.image-tag }}
88+ IMAGE_TAG : ${{ inputs.image-tag || github.sha }}
5289 OPENSHELL_REGISTRY : ghcr.io/nvidia/openshell
5390 OPENSHELL_REGISTRY_HOST : ghcr.io
5491 OPENSHELL_REGISTRY_NAMESPACE : nvidia/openshell
@@ -62,28 +99,29 @@ jobs:
6299 run : echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin
63100
64101 - name : Pull cluster image
65- run : docker pull ghcr.io/nvidia/openshell/cluster:${{ inputs.image-tag }}
102+ run : docker pull ghcr.io/nvidia/openshell/cluster:${{ inputs.image-tag || github.sha }}
66103
67104 - name : Install Python dependencies and generate protobuf stubs
68- if : matrix.suite == 'python'
105+ if : matrix.suite == 'python' || matrix.suite == 'python-gpu'
69106 run : uv sync --frozen && mise run --no-prepare python:proto
70107
71108 - name : Build Rust CLI
72- if : matrix.suite != 'python '
109+ if : matrix.suite == 'rust' || matrix.suite == 'gateway-resume '
73110 run : cargo build -p openshell-cli --features openshell-core/dev-settings
74111
75112 - name : Install SSH client
76- if : matrix.suite != 'python '
113+ if : matrix.suite == 'rust' || matrix.suite == 'gateway-resume '
77114 run : apt-get update && apt-get install -y --no-install-recommends openssh-client && rm -rf /var/lib/apt/lists/*
78115
79116 - name : Bootstrap cluster
80117 env :
81118 GATEWAY_HOST : host.docker.internal
82119 GATEWAY_PORT : ${{ matrix.port }}
83120 CLUSTER_NAME : ${{ matrix.cluster }}
121+ CLUSTER_GPU : ${{ matrix.cluster_gpu }}
84122 SKIP_IMAGE_PUSH : " 1"
85123 SKIP_CLUSTER_IMAGE_BUILD : " 1"
86- OPENSHELL_CLUSTER_IMAGE : ghcr.io/nvidia/openshell/cluster:${{ inputs.image-tag }}
124+ OPENSHELL_CLUSTER_IMAGE : ghcr.io/nvidia/openshell/cluster:${{ inputs.image-tag || github.sha }}
87125 run : mise run --no-prepare --skip-deps cluster
88126
89127 - name : Run tests
0 commit comments