Skip to content

fix: render buffered output on terminal session attach #45

fix: render buffered output on terminal session attach

fix: render buffered output on terminal session attach #45

Workflow file for this run

name: PR Validation
on:
pull_request:
branches: [main]
concurrency:
group: pr-${{ github.event.pull_request.number }}
cancel-in-progress: true
env:
NODE_OPTIONS: "--max-old-space-size=4096"
GO_VERSION: "1.26"
NODE_VERSION: "24"
PNPM_VERSION: "10"
jobs:
# ─────────────────────────────────────────────────────────────────────────────
# E2E Tests — Playwright against server mode
# Disabled: Wails v3 alpha.74 server mode is broken (BrowserWindow missing
# AttachModal method). Re-enable when upstream fixes this.
# ─────────────────────────────────────────────────────────────────────────────
e2e-tests:
if: false # TODO: re-enable when Wails v3 server mode is fixed
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Linux dependencies
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libgtk-3-dev libwebkit2gtk-4.1-dev libwayland-dev build-essential pkg-config xvfb
version: 1.0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
run_install: |
- args: []
- args: [--global, typescript]
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache: true
cache-dependency-path: "go.sum"
- name: Install Task
uses: arduino/setup-task@v2
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Wails v3
run: go install github.com/wailsapp/wails/v3/cmd/wails3@latest
- name: Build workspace packages
run: task packages
- name: Install Playwright browsers
working-directory: e2e
run: pnpm exec playwright install --with-deps chromium
- name: Build and start server mode
run: |
task common:build:frontend
go build -tags server -o bin/Omniview-server .
bin/Omniview-server &
echo "Waiting for server to be ready..."
for i in $(seq 1 60); do
if curl -sf http://localhost:34115/health > /dev/null 2>&1; then
echo "Server ready"
break
fi
sleep 2
done
- name: Run Playwright tests
working-directory: e2e
run: pnpm test
- name: Upload test report
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: |
e2e/playwright-report/
e2e/test-results/
retention-days: 7
# ─────────────────────────────────────────────────────────────────────────────
# Build Artifacts — downloadable binaries for manual testing
# ─────────────────────────────────────────────────────────────────────────────
build-artifacts:
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
platform: darwin/universal
artifact-name: pr-build-macos
build-tags: "production"
extra-ldflags: ""
- os: ubuntu-latest
platform: linux/amd64
artifact-name: pr-build-linux
build-tags: "production,webkit2_41"
extra-ldflags: ""
- os: windows-latest
platform: windows/amd64
artifact-name: pr-build-windows
build-tags: "production"
extra-ldflags: "-H windowsgui"
runs-on: ${{ matrix.os }}
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Linux dependencies
if: runner.os == 'Linux'
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libgtk-3-dev libwebkit2gtk-4.1-dev libwayland-dev build-essential pkg-config
version: 1.0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
run_install: |
- args: []
- args: [--global, typescript]
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache: true
cache-dependency-path: "go.sum"
- name: Install Task
uses: arduino/setup-task@v2
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Wails v3
shell: bash
run: go install github.com/wailsapp/wails/v3/cmd/wails3@latest
- name: Build workspace packages
shell: bash
run: task packages
- name: Build frontend
shell: bash
run: task common:build:frontend
- name: Build Omniview
shell: bash
env:
CGO_ENABLED: "1"
CGO_CFLAGS: ${{ runner.os == 'macOS' && '-mmacosx-version-min=10.15' || '' }}
CGO_LDFLAGS: ${{ runner.os == 'macOS' && '-mmacosx-version-min=10.15' || '' }}
MACOSX_DEPLOYMENT_TARGET: ${{ runner.os == 'macOS' && '10.15' || '' }}
run: |
go build -tags "${{ matrix.build-tags }}" -trimpath -buildvcs=false \
-ldflags "-w -s ${{ matrix.extra-ldflags }} \
-X github.com/omniviewdev/omniview/internal/version.Version=0.0.0-pr.${{ github.event.pull_request.number }} \
-X github.com/omniviewdev/omniview/internal/version.GitCommit=${{ github.sha }} \
-X github.com/omniviewdev/omniview/internal/version.BuildDate=$(date -u +%Y-%m-%dT%H:%M:%SZ) \
-X github.com/omniviewdev/omniview/internal/version.Development=true \
-X github.com/omniviewdev/omniview/internal/appstate.buildStateDir=~/.omniview-pr" \
-o bin/Omniview .
- name: Create macOS .app bundle
if: runner.os == 'macOS'
run: |
task common:generate:icons
mkdir -p bin/Omniview.app/Contents/MacOS
mkdir -p bin/Omniview.app/Contents/Resources
cp build/darwin/icons.icns bin/Omniview.app/Contents/Resources/
cp bin/Omniview bin/Omniview.app/Contents/MacOS/
cp build/darwin/Info.plist bin/Omniview.app/Contents/
codesign --force --deep --sign - bin/Omniview.app
- name: Prepare artifact (macOS)
if: runner.os == 'macOS'
run: |
cd bin
zip -r Omniview-pr${{ github.event.pull_request.number }}-macos.zip Omniview.app
- name: Prepare artifact (Linux)
if: runner.os == 'Linux'
working-directory: bin
run: mv Omniview "Omniview-pr${{ github.event.pull_request.number }}-linux-amd64"
- name: Prepare artifact (Windows)
if: runner.os == 'Windows'
working-directory: bin
run: Rename-Item -Path "Omniview" -NewName "Omniview-pr${{ github.event.pull_request.number }}-windows-amd64.exe"
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact-name }}
path: |
bin/*.zip
bin/Omniview-pr*
if-no-files-found: error
retention-days: 5