@@ -114,15 +114,14 @@ jobs:
114114 libssl-dev \
115115 libprotobuf-dev protobuf-compiler \
116116 libabsl-dev \
117- libwayland-dev libdecor-0-dev \
118- jq
117+ libwayland-dev libdecor-0-dev
119118
120119 - name : Install deps (macOS)
121120 if : runner.os == 'macOS'
122121 run : |
123122 set -eux
124123 brew update
125- brew install cmake ninja protobuf abseil jq
124+ brew install cmake ninja protobuf abseil
126125
127126 # ---------- Rust toolchain ----------
128127 - name : Install Rust (stable)
@@ -207,47 +206,15 @@ jobs:
207206 --gtest_brief=1 `
208207 --gtest_output="xml:build-release\unit-test-results.xml"
209208
210- # ---------- Install + start livekit-server for integration tests ----------
211- - name : Install livekit-server and lk CLI
212- if : matrix.e2e-testing
213- shell : bash
214- run : |
215- set -euxo pipefail
216- if [[ "$RUNNER_OS" == "Linux" ]]; then
217- # Linux: official install scripts. lk's installer parses the GitHub
218- # API JSON with jq (already installed above).
219- curl -sSL https://get.livekit.io | bash
220- curl -sSL https://get.livekit.io/cli | bash
221- else
222- # macOS: Homebrew formulas. Server install script aborts on Darwin.
223- brew install livekit livekit-cli
224- fi
225- livekit-server --version
226- lk --version
227-
209+ # ---------- Start livekit-server for integration tests ----------
228210 - name : Start livekit-server
229211 if : matrix.e2e-testing
230- shell : bash
231- env :
232- LIVEKIT_CONFIG : " enable_data_tracks: true"
233- run : |
234- set -euxo pipefail
235- # Background the server with nohup so it survives this step's shell
236- # exit and remains running for the integration-test step.
237- nohup livekit-server --dev > livekit-server.log 2>&1 &
238- echo $! > livekit-server.pid
239- # Port 7880 is a WebSocket endpoint, so a TCP-connect probe is the
240- # most reliable readiness signal.
241- for _ in {1..30}; do
242- if nc -z 127.0.0.1 7880 >/dev/null 2>&1; then
243- echo "livekit-server is ready"
244- exit 0
245- fi
246- sleep 1
247- done
248- echo "::error::livekit-server failed to start within 30s"
249- tail -n 200 livekit-server.log || true
250- exit 1
212+ id : livekit_server
213+ uses : livekit/dev-server-action@61e2b4dcb170dd3591e0c9b0db3c3fe5db93b500
214+ with :
215+ github-token : ${{ github.token }}
216+ config : |
217+ enable_data_tracks: true
251218
252219 - name : Run integration tests
253220 if : matrix.e2e-testing
@@ -261,19 +228,10 @@ jobs:
261228 build-release/bin/livekit_integration_tests \
262229 --gtest_output=xml:build-release/integration-test-results.xml
263230
264- - name : Stop livekit-server
265- if : always() && matrix.e2e-testing
266- shell : bash
267- run : |
268- if [ -f livekit-server.pid ]; then
269- kill "$(cat livekit-server.pid)" 2>/dev/null || true
270- rm -f livekit-server.pid
271- fi
272-
273231 - name : Dump livekit-server log on failure
274232 if : failure() && matrix.e2e-testing
275233 shell : bash
276- run : tail -n 500 livekit-server. log || true
234+ run : tail -n 500 "${{ steps.livekit_server.outputs. log-path }}" || true
277235
278236 # ---------- Upload results ----------
279237 - name : Upload test results
@@ -284,7 +242,7 @@ jobs:
284242 path : |
285243 build-release/unit-test-results.xml
286244 build-release/integration-test-results.xml
287- livekit-server. log
245+ ${{ steps.livekit_server.outputs. log-path }}
288246 if-no-files-found : ignore
289247 retention-days : 7
290248
0 commit comments