Release Monk plugin v0.1.50 #198
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Install E2E | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "v*" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| unix: | |
| name: ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - macos-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install monk-agent | |
| shell: bash | |
| env: | |
| MONK_AGENT_INSTALL_DIR: ${{ runner.temp }}/monk-bin | |
| MONK_AGENT_CHANNEL: ${{ startsWith(github.ref, 'refs/tags/v') && 'stable' || 'nightly' }} | |
| run: | | |
| set -euo pipefail | |
| installed="$(./scripts/ensure-monk-agent.sh)" | |
| test "$installed" = "$MONK_AGENT_INSTALL_DIR/monk-agent" | |
| test -x "$installed" | |
| - name: Run monk-agent status | |
| shell: bash | |
| env: | |
| MONK_AGENT_HOME: ${{ runner.temp }}/monk-home | |
| MONK_AGENT_DEV: "1" | |
| MONK_AGENT_SIMULATE_AUTH: "1" | |
| MONK_AGENT_MOCK_RUNTIME: "1" | |
| MONK_AGENT_VAULT_BACKEND: file | |
| MONK_AGENT_STORE: file | |
| MONK_TELEMETRY: "0" | |
| run: | | |
| set -euo pipefail | |
| "$RUNNER_TEMP/monk-bin/monk-agent" status | tee "$RUNNER_TEMP/status.json" | |
| grep '"version"' "$RUNNER_TEMP/status.json" | |
| grep '"signedIn": true' "$RUNNER_TEMP/status.json" | |
| - name: Check launcher fast-path reuse/restart | |
| shell: bash | |
| run: ./tests/start-monk-agent-fastpath.sh | |
| - name: Check launcher readiness deadline | |
| shell: bash | |
| run: ./tests/start-monk-agent-readiness-timeout.sh | |
| windows: | |
| name: windows-latest | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Test Windows block-monk fallbacks | |
| shell: pwsh | |
| run: .\tests\block-monk-windows.ps1 | |
| - name: Check launcher readiness deadline | |
| shell: pwsh | |
| run: .\tests\start-monk-agent-readiness-timeout.ps1 | |
| - name: Install monk-agent | |
| shell: pwsh | |
| env: | |
| MONK_AGENT_INSTALL_DIR: ${{ runner.temp }}\monk-bin | |
| MONK_AGENT_CHANNEL: ${{ startsWith(github.ref, 'refs/tags/v') && 'stable' || 'nightly' }} | |
| run: | | |
| $installed = .\scripts\ensure-monk-agent.ps1 | |
| if ($installed -ne "$env:MONK_AGENT_INSTALL_DIR\monk-agent.exe") { | |
| throw "unexpected install path: $installed" | |
| } | |
| if (-not (Test-Path $installed)) { | |
| throw "monk-agent.exe was not installed" | |
| } | |
| - name: Run monk-agent status | |
| shell: pwsh | |
| env: | |
| MONK_AGENT_HOME: ${{ runner.temp }}\monk-home | |
| MONK_AGENT_DEV: "1" | |
| MONK_AGENT_SIMULATE_AUTH: "1" | |
| MONK_AGENT_MOCK_RUNTIME: "1" | |
| MONK_AGENT_VAULT_BACKEND: file | |
| MONK_AGENT_STORE: file | |
| MONK_TELEMETRY: "0" | |
| run: | | |
| $statusPath = "$env:RUNNER_TEMP\status.json" | |
| & "$env:RUNNER_TEMP\monk-bin\monk-agent.exe" status | Tee-Object -FilePath $statusPath | |
| $rawStatus = Get-Content -Raw $statusPath | |
| $jsonStart = $rawStatus.IndexOf("{") | |
| if ($jsonStart -lt 0) { | |
| throw "monk-agent status did not print JSON" | |
| } | |
| $status = $rawStatus.Substring($jsonStart) | ConvertFrom-Json | |
| if (-not $status.version) { | |
| throw "missing version in monk-agent status" | |
| } | |
| if (-not $status.auth.signedIn) { | |
| throw "expected simulated auth to be signed in" | |
| } | |
| - name: Start monk-agent | |
| shell: pwsh | |
| env: | |
| MONK_AGENT_INSTALL_DIR: ${{ runner.temp }}\monk-bin | |
| MONK_AGENT_HOME: ${{ runner.temp }}\monk-start-home | |
| MONK_AGENT_DEV: "1" | |
| MONK_AGENT_SIMULATE_AUTH: "1" | |
| MONK_AGENT_MOCK_RUNTIME: "1" | |
| MONK_AGENT_VAULT_BACKEND: file | |
| MONK_AGENT_STORE: file | |
| MONK_AGENT_OPEN_BROWSER: "0" | |
| MONK_AGENT_SKIP_ENSURE: "1" | |
| MONK_TELEMETRY: "0" | |
| run: | | |
| .\scripts\start-monk-agent.ps1 | |
| $pidPath = Join-Path $env:MONK_AGENT_HOME "agent\launcher\run\monk-agent.pid" | |
| if (-not (Test-Path $pidPath)) { | |
| throw "monk-agent pid file was not created" | |
| } | |
| $agentPid = [int](Get-Content -Raw $pidPath) | |
| try { | |
| $metadata = Invoke-WebRequest -Uri "http://127.0.0.1:7419/.well-known/oauth-protected-resource" -UseBasicParsing -TimeoutSec 5 | |
| if ($metadata.Content -notmatch '"resource"') { | |
| throw "monk-agent health metadata did not include resource" | |
| } | |
| } finally { | |
| Stop-Process -Id $agentPid -Force -ErrorAction SilentlyContinue | |
| } |