diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 745fe371..36597bf4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -77,6 +77,8 @@ jobs: include: - name: Windows os: windows-latest + - name: Linux + os: ubuntu-latest - name: macOS os: macos-latest runs-on: ${{ matrix.os }} @@ -89,6 +91,17 @@ jobs: if: runner.os == 'macOS' with: flutter-version: ${{ env.FLUTTER_VERSION }} + - name: Install Linux WebView dependencies + if: runner.os == 'Linux' + run: | + sudo apt-get update -y + sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev xvfb + - name: Test webview + if: runner.os == 'Linux' + # Repeat on the same GTK event loop to catch callbacks after destruction. + run: xvfb-run -a go test -tags webview -v -count=5 -timeout 300s ./internal/webview/goprovider/ + env: + CGO_ENABLED: 1 - name: Test webview if: runner.os == 'Windows' # Repeat close/reopen coverage to catch browser shutdown races. diff --git a/go.mod b/go.mod index 8e2df199..179214fa 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.25.4 require ( codeberg.org/gruf/go-ffmpreg v0.6.23-0.20260827095416-df1836cb5be0 - github.com/GopeedLab/webview_go v0.0.0-20260917155218-bd16da0d6f53 + github.com/GopeedLab/webview_go v0.0.0-20260917161756-2a4f989dcb1d github.com/anacrolix/torrent v1.60.1-0.20251217073903-486bcbe758e0 github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 github.com/bodgit/sevenzip v1.6.1 diff --git a/go.sum b/go.sum index 94643aa2..c341802f 100644 --- a/go.sum +++ b/go.sum @@ -33,6 +33,8 @@ github.com/GopeedLab/webview_go v0.0.0-20260917155039-1ee7ffb4169a h1:yudcfXpipK github.com/GopeedLab/webview_go v0.0.0-20260917155039-1ee7ffb4169a/go.mod h1:FvV19lu9rQ9NcbczN5y8pbWecURRRbWa8tbfFARBDa0= github.com/GopeedLab/webview_go v0.0.0-20260917155218-bd16da0d6f53 h1:nMSHKhbrEaWPE/x3mYl/270GPjswbUmS+E7yYjly4xk= github.com/GopeedLab/webview_go v0.0.0-20260917155218-bd16da0d6f53/go.mod h1:oNO07SCX8xgoHLds2OBwML8TU4xils88vMQ4gadKUHQ= +github.com/GopeedLab/webview_go v0.0.0-20260917161756-2a4f989dcb1d h1:4fjlhJpBWa6IcdKVPkEMMIDd6Xo9JM09dJHdKU+1V7k= +github.com/GopeedLab/webview_go v0.0.0-20260917161756-2a4f989dcb1d/go.mod h1:oNO07SCX8xgoHLds2OBwML8TU4xils88vMQ4gadKUHQ= github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0= github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY=