From de30aa8d7fbb5a03aec59a6093d5618a207988d0 Mon Sep 17 00:00:00 2001 From: Tobias Gesellchen Date: Sat, 29 Aug 2026 16:46:26 +0200 Subject: [PATCH] ci(player): add a separate workflow for browser compatibility tests Runs the opt-in "make test-browser" chromedp tests (added in the previous commit) on their own, independent of ci.yml's main test job, since they need a Chrome/Chromium binary in the runner. Mirrors ci.yml's checkout/setup-go/cache steps and pinned action versions, and verifies google-chrome is present with a clear error message before running, rather than surfacing a cryptic chromedp allocator failure if the runner image ever stops shipping it preinstalled. Co-Authored-By: Claude Sonnet 5 --- .github/workflows/browser-tests.yml | 49 +++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/browser-tests.yml diff --git a/.github/workflows/browser-tests.yml b/.github/workflows/browser-tests.yml new file mode 100644 index 00000000..b9191641 --- /dev/null +++ b/.github/workflows/browser-tests.yml @@ -0,0 +1,49 @@ +name: Browser Compatibility Tests + +permissions: + contents: read + +on: + push: + branches: [main] + pull_request: + branches: [main] + workflow_dispatch: + +jobs: + test-browser: + name: Player browser tests + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + - name: Set up Go + uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 + with: + go-version-file: "go.mod" + + - name: Cache Go modules + uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.mod') }}-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + + - name: Download dependencies + run: go mod download + + - name: Verify a Chrome/Chromium binary is available + # chromedp (used by the browsertest-tagged tests) discovers Chrome on + # PATH or in a standard install location; GitHub's ubuntu-latest + # runner image ships Google Chrome preinstalled. Fail fast with a + # clear message here instead of a cryptic chromedp allocator error + # if that image ever stops including it. + run: google-chrome --version + + - name: Run browser-level player compatibility tests + run: make test-browser