name: CI on: push: branches: [main, master, dev] pull_request: branches: [main, master, dev] permissions: contents: read jobs: gateway-ui: runs-on: ubuntu-latest defaults: run: working-directory: ui steps: - uses: actions/checkout@v4 - uses: oven-sh/setup-bun@v2 with: bun-version: '1.4.4' - run: bun install --frozen-lockfile - run: bun run lint - run: bun run test - run: bun run build - run: bunx playwright install --with-deps chromium webkit - run: bun run e2e test: name: Go (${{ matrix.os }}) runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: go-version-file: go.mod cache: true - name: Format check shell: bash run: | start=$(date +%s) files=$(gofmt -l $(find . -name '*.go' -not -path './vendor/*')) test -z "$files" || { printf '%s\n' "$files"; exit 1; } echo "format_seconds=$(($(date +%s)-start))" - name: Vet shell: bash run: | start=$(date +%s) go vet ./... echo "vet_seconds=$(($(date +%s)-start))" - name: Test if: runner.os != 'Windows' shell: bash run: | start=$(date +%s) go test ./... echo "test_seconds=$(($(date +%s)-start))" - name: Test (PowerShell) if: runner.os == 'Windows' shell: pwsh run: | $timer = [Diagnostics.Stopwatch]::StartNew() go test ./... if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } Write-Output "test_seconds=$($timer.Elapsed.TotalSeconds)" - name: Build shell: bash run: | start=$(date +%s) go build ./cmd/agentpack echo "build_seconds=$(($(date +%s)-start))" omp-runtime: name: OMP native runtime runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: go-version-file: go.mod cache: true - uses: oven-sh/setup-bun@v2 with: bun-version: '1.4.4' - name: Install the validated OMP release run: | mkdir -p "$RUNNER_TEMP/omp-runtime" cd "$RUNNER_TEMP/omp-runtime" bun add @oh-my-pi/pi-coding-agent@18.14.0 - name: Verify native discovery, hooks, MCP, LSP, and resume env: AGENTPACK_TEST_OMP: ${{ runner.temp }}/omp-runtime/node_modules/.bin/omp run: | go test ./internal/harness/omp go test ./integration -run '^TestOMPRealRuntimeWithPackHooksMCPAndLSP$' race: name: Race detector runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: go-version-file: go.mod cache: true - name: Race tests run: | start=$(date +%s) go test -race ./... echo "race_seconds=$(($(date +%s)-start))" contribution-fixtures: name: Portable environment contribution fixtures runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: go-version-file: go.mod cache: true - name: Build real CLI run: go build -o /tmp/agentpack-fixtures ./cmd/agentpack - name: Offline preflight and relocation evidence run: | sudo apt-get update sudo apt-get install -y strace python3 evaluation/icse/run.py --binary /tmp/agentpack-fixtures --trace