mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-20 20:00:45 +02:00
96 lines
3.1 KiB
YAML
96 lines
3.1 KiB
YAML
name: Windows Setup E2E
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
# End-to-end optional-runtime gate for Windows. It first proves dry-run is
|
|
# non-mutating, then performs an explicit browser-capability install, checks
|
|
# doctor and the native artifact, and uninstalls. Agent Skills host placement
|
|
# is deliberately outside this workflow and is covered by gstack2-gate.yml.
|
|
#
|
|
# Separate from windows-free-tests.yml because that one runs a curated
|
|
# unit-test subset; this one exercises the install path itself.
|
|
#
|
|
# Runner: GitHub-hosted free windows-latest. ~3-5 min total.
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [main]
|
|
paths:
|
|
- 'package.json'
|
|
- 'scripts/build.sh'
|
|
- 'scripts/write-version-files.sh'
|
|
- 'setup'
|
|
- 'runtime/**'
|
|
- 'browse/src/cli.ts'
|
|
- 'browse/src/find-browse.ts'
|
|
- 'bin/gstack-paths'
|
|
- '.github/workflows/windows-setup-e2e.yml'
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: windows-setup-e2e-${{ github.head_ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
windows-setup:
|
|
runs-on: windows-latest
|
|
timeout-minutes: 15
|
|
|
|
steps:
|
|
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
|
|
|
- name: Configure isolated runtime home
|
|
run: echo "GSTACK_HOME=$RUNNER_TEMP/gstack-setup-e2e" >> "$GITHUB_ENV"
|
|
shell: bash
|
|
|
|
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
|
|
with:
|
|
bun-version: 1.3.14
|
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
|
with:
|
|
node-version: 22.23.1
|
|
|
|
- name: Configure git identity
|
|
run: |
|
|
git config --global user.email "windows-setup-e2e@gstack.test"
|
|
git config --global user.name "Windows Setup E2E"
|
|
git config --global init.defaultBranch main
|
|
shell: bash
|
|
|
|
- name: Install dependencies
|
|
run: bun install --frozen-lockfile
|
|
shell: bash
|
|
|
|
- name: Preview without mutating state
|
|
run: |
|
|
set -e
|
|
bash ./setup --dry-run --capabilities browser
|
|
test ! -e "$GSTACK_HOME" || (echo "dry-run mutated GSTACK_HOME" && exit 1)
|
|
shell: bash
|
|
|
|
- name: Explicitly install the browser capability
|
|
run: |
|
|
set -e
|
|
bash ./setup --install-now --yes --capabilities browser
|
|
test -f "$GSTACK_HOME/versions/current.json"
|
|
test -f "$GSTACK_HOME/bin/gstack.cmd"
|
|
shell: bash
|
|
|
|
- name: Verify doctor and installed native browser
|
|
run: |
|
|
set -e
|
|
node runtime/cli.js doctor --json > doctor.json
|
|
node -e 'const r=require("./doctor.json");if(!r.checks.some(x=>x.id==="managed-runtime"&&x.status==="pass"))process.exit(1);if(!r.checks.some(x=>x.id==="capability:browser"&&x.status==="pass"))process.exit(1)'
|
|
browser=$(node runtime/cli.js runtime path browse/dist/browse.exe)
|
|
test -f "$browser"
|
|
shell: bash
|
|
|
|
- name: Uninstall the runtime and preserve user state
|
|
run: |
|
|
set -e
|
|
node runtime/cli.js uninstall
|
|
test ! -e "$GSTACK_HOME/versions/current.json"
|
|
test -d "$GSTACK_HOME/projects"
|
|
shell: bash
|