feat(dew-win): run as grove's services engine (dew.toml, --services-only, services/exec --json) #434
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: '1.25' | |
| - name: Build | |
| run: go build ./... | |
| - name: Test | |
| run: go test ./... -count=1 -v | |
| - name: Cross-compile guest agent | |
| run: | | |
| GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o dew-agent-linux-amd64 ./cmd/dew-agent/ | |
| GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -o dew-agent-linux-arm64 ./cmd/dew-agent/ | |
| ls -lh dew-agent-linux-* | |
| # The guest agent is //go:build linux and can't run on the macOS test | |
| # job above (go test skips linux-tagged files there). Run its tests | |
| # natively on Linux so the agent's behavior — including the exec stdin | |
| # wiring — is actually exercised, not just cross-compiled. | |
| test-linux-agent: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: '1.25' | |
| - name: Test guest agent + shared protocol (linux) | |
| run: go test -count=1 -v ./cmd/dew-agent/ ./internal/vsock/ | |
| # dew-win is //go:build windows and is skipped by the macOS test job | |
| # (go test ./... excludes windows-tagged files there). Build and test | |
| # it natively on Windows so the wrapper's pure helpers — exec/argv | |
| # building, wsl --list parsing, .wslconfig and package.json detection — | |
| # are compiled and exercised, and windows/arm64 build breaks (which no | |
| # other job would catch) surface here. | |
| test-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: '1.25' | |
| - name: Build dew-win | |
| run: go build ./cmd/dew-win/ | |
| - name: Test dew-win | |
| run: go test ./cmd/dew-win/ -count=1 -v -cover | |
| - name: Cross-compile dew-win (windows/arm64) | |
| run: go build ./cmd/dew-win/ | |
| env: | |
| GOOS: windows | |
| GOARCH: arm64 | |
| npm: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: '20' | |
| - name: Run npm dispatcher + scripts tests | |
| working-directory: npm | |
| run: npm test |