From a73a0dad2f167ebe207bef1b74575253af1a67da Mon Sep 17 00:00:00 2001 From: Alan George Date: Mon, 22 Jun 2026 19:41:06 -0600 Subject: [PATCH 1/2] Enable Windows integration tests in CI Run E2E tests on windows-x64 using dev-server-action and a gh-downloaded lk CLI (with PATH fix for the install step). Skip platform-audio frame flow when no recording device is available on headless runners. Co-authored-by: Cursor --- .github/workflows/tests.yml | 27 ++++++++++++++++--- src/tests/integration/test_platform_audio.cpp | 6 +++++ 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f4c29b4e..9144811f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -49,10 +49,11 @@ jobs: name: macos-x64 build_cmd: ./build.sh release-tests --macos-arch x86_64 e2e-testing: true - # Pinned to Windows 2022 for current VS 17 implementation + # Pinned to Windows 2022 for current VS 17 implementation - os: windows-2022 name: windows-x64 build_cmd: .\build.cmd release-tests + e2e-testing: true name: Test (${{ matrix.name }}) runs-on: ${{ matrix.os }} @@ -214,23 +215,43 @@ jobs: uses: livekit/dev-server-action@61e2b4dcb170dd3591e0c9b0db3c3fe5db93b500 with: github-token: ${{ github.token }} + config: | + enable_data_tracks: true # Needed by token helper script - name: Install livekit-cli if: matrix.e2e-testing shell: bash + env: + GH_TOKEN: ${{ github.token }} run: | set -euxo pipefail if [[ "$RUNNER_OS" == "Linux" ]]; then curl -sSL https://get.livekit.io/cli | bash - else + elif [[ "$RUNNER_OS" == "macOS" ]]; then brew install livekit-cli + elif [[ "$RUNNER_OS" == "Windows" ]]; then + install_dir="$RUNNER_TEMP/livekit-cli" + mkdir -p "$install_dir" + tag="$(gh api repos/livekit/livekit-cli/releases/latest --jq '.tag_name')" + gh release download "$tag" \ + --repo livekit/livekit-cli \ + --pattern "*_windows_amd64.zip" \ + --output "$RUNNER_TEMP/lk.zip" + unzip -o "$RUNNER_TEMP/lk.zip" -d "$install_dir" + # GITHUB_PATH updates apply to subsequent steps only; export PATH here + # so lk --version in this step succeeds. + echo "$install_dir" >> "$GITHUB_PATH" + export PATH="$install_dir:$PATH" + else + echo "::error::Unsupported runner OS for livekit-cli install: ${RUNNER_OS}" + exit 1 fi lk --version - name: Run integration tests if: matrix.e2e-testing - timeout-minutes: 5 + timeout-minutes: 10 shell: bash env: RUST_LOG: "metrics=debug" diff --git a/src/tests/integration/test_platform_audio.cpp b/src/tests/integration/test_platform_audio.cpp index fe35c7b7..c6e86596 100644 --- a/src/tests/integration/test_platform_audio.cpp +++ b/src/tests/integration/test_platform_audio.cpp @@ -248,6 +248,12 @@ TEST_F(PlatformAudioIntegrationTest, PlatformAudioFramesReachRemote) { GTEST_SKIP() << "PlatformAudio unavailable: " << error.what(); } + // Some platforms (notably Windows) construct a valid ADM even on a headless + // CI runner with no microphone: guard against that here. + if (platform_audio->recordingDeviceCount() == 0) { + GTEST_SKIP() << "No recording device available; cannot capture platform audio frames"; + } + RoomOptions options; options.auto_subscribe = true; From c7bd2da7e4006db1d37dd36983c98a9c6fde25f2 Mon Sep 17 00:00:00 2001 From: Alan George Date: Mon, 22 Jun 2026 19:51:21 -0600 Subject: [PATCH 2/2] Cleanup tests.yml --- .github/workflows/tests.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9144811f..ca8c499c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -215,14 +215,13 @@ jobs: uses: livekit/dev-server-action@61e2b4dcb170dd3591e0c9b0db3c3fe5db93b500 with: github-token: ${{ github.token }} - config: | - enable_data_tracks: true # Needed by token helper script - name: Install livekit-cli if: matrix.e2e-testing shell: bash env: + # Windows installs lk via `gh api` / `gh release download`, which need this env var GH_TOKEN: ${{ github.token }} run: | set -euxo pipefail