11name : CI - Coordinator Test
22
33# Runs coordinator unit tests and e2e tests. Path filter excludes paths not
4- # exercised by the coordinator.
4+ # exercised by the coordinator. The e2e-images matrix job is followed by an
5+ # e2e-images-status job that aggregates its result, since GitHub required
6+ # status checks cannot reference individual matrix legs.
57on :
68 push :
79 branches :
4042 - scripts/**
4143 - hack/**
4244 - test/**
45+ - .github/actions/docker-build-and-push/action.yml
4346 - .github/actions/e2e-runner-setup/action.yml
4447 - .github/workflows/ci-coordinator.yaml
4548 - '!Dockerfile.sidecar'
@@ -85,10 +88,85 @@ jobs:
8588 GO_BUILD_CACHE_VOL : ${{ steps.go-cache.outputs.build }}
8689 run : make -f Makefile.coord.mk test-unit
8790
88- e2e-tests :
91+ e2e-images :
8992 needs : check-changes
9093 if : ${{ needs.check-changes.outputs.src == 'true' }}
9194 runs-on : ubuntu-latest
95+ timeout-minutes : 20
96+ strategy :
97+ fail-fast : false
98+ matrix :
99+ image :
100+ - name : builder
101+ source : build
102+ docker-file : Dockerfile.builder
103+ image-name : llm-d-builder
104+ archive : llm-d-builder
105+ - name : coordinator
106+ source : build
107+ docker-file : Dockerfile.coordinator
108+ image-name : llm-d-coordinator
109+ archive : llm-d-coordinator
110+ - name : epp
111+ source : build
112+ docker-file : Dockerfile.epp
113+ image-name : llm-d-router-endpoint-picker
114+ archive : llm-d-router-endpoint-picker
115+ - name : simulator
116+ source : pull
117+ image : ghcr.io/llm-d/llm-d-inference-sim:v0.10.2
118+ archive : llm-d-inference-sim
119+ name : e2e-images (${{ matrix.image.name }})
120+ steps :
121+ - name : Checkout source
122+ if : ${{ matrix.image.source == 'build' }}
123+ uses : actions/checkout@v7
124+
125+ - name : Build ${{ matrix.image.name }} image
126+ if : ${{ matrix.image.source == 'build' }}
127+ uses : ./.github/actions/docker-build-and-push
128+ with :
129+ docker-file : ${{ matrix.image.docker-file }}
130+ image-name : ${{ matrix.image.image-name }}
131+ tag : dev
132+ registry : ghcr.io/llm-d
133+ push : ' false'
134+ buildx-outputs : type=docker,dest=${{ runner.temp }}/${{ matrix.image.archive }}.tar
135+ commit-sha : ${{ github.sha }}
136+
137+ - name : Pull ${{ matrix.image.name }} image
138+ if : ${{ matrix.image.source == 'pull' }}
139+ run : |
140+ docker pull --platform linux/amd64 "${{ matrix.image.image }}"
141+ docker save "${{ matrix.image.image }}" -o "${{ runner.temp }}/${{ matrix.image.archive }}.tar"
142+
143+ - name : Upload ${{ matrix.image.name }} image
144+ uses : actions/upload-artifact@v7
145+ with :
146+ name : e2e-coord-image-${{ matrix.image.name }}
147+ path : ${{ runner.temp }}/${{ matrix.image.archive }}.tar
148+ retention-days : 1
149+ compression-level : 0
150+
151+ e2e-images-status :
152+ needs : e2e-images
153+ if : always()
154+ runs-on : ubuntu-latest
155+ steps :
156+ - name : Check e2e-images result
157+ run : |
158+ result="${{ needs.e2e-images.result }}"
159+ if [[ "$result" != "success" && "$result" != "skipped" ]]; then
160+ echo "::error::e2e-images failed for at least one matrix image"
161+ exit 1
162+ fi
163+
164+ e2e-tests :
165+ needs :
166+ - check-changes
167+ - e2e-images
168+ if : ${{ needs.check-changes.outputs.src == 'true' }}
169+ runs-on : ubuntu-latest
92170 timeout-minutes : 60
93171 steps :
94172 - name : Checkout source
@@ -98,9 +176,40 @@ jobs:
98176 id : e2e-setup
99177 uses : ./.github/actions/e2e-runner-setup
100178
179+ - name : Download builder image
180+ uses : actions/download-artifact@v8
181+ with :
182+ name : e2e-coord-image-builder
183+ path : ${{ runner.temp }}/e2e-images
184+
185+ - name : Download coordinator image
186+ uses : actions/download-artifact@v8
187+ with :
188+ name : e2e-coord-image-coordinator
189+ path : ${{ runner.temp }}/e2e-images
190+
191+ - name : Download EPP image
192+ uses : actions/download-artifact@v8
193+ with :
194+ name : e2e-coord-image-epp
195+ path : ${{ runner.temp }}/e2e-images
196+
197+ - name : Download simulator image
198+ uses : actions/download-artifact@v8
199+ with :
200+ name : e2e-coord-image-simulator
201+ path : ${{ runner.temp }}/e2e-images
202+
203+ - name : Load e2e images
204+ shell : bash
205+ run : |
206+ for image in "${RUNNER_TEMP}"/e2e-images/*.tar; do
207+ docker load --input "$image"
208+ done
209+
101210 - name : Run coordinator e2e tests
102211 shell : bash
103212 env :
104213 GO_MOD_CACHE_VOL : ${{ steps.e2e-setup.outputs.go-mod-cache }}
105214 GO_BUILD_CACHE_VOL : ${{ steps.e2e-setup.outputs.go-build-cache }}
106- run : make -f Makefile.coord.mk test-e2e-coordinator
215+ run : make -f Makefile.coord.mk test-e2e-coordinator-run
0 commit comments