test(sandbox): real-kernel bwrap integration + Linux CI setup (step 1 of #10) #278
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| check: | |
| name: Typecheck + Lint + Test (${{ matrix.os }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| # Need Node 22+ for fs.promises.glob (used by GlobTool). | |
| # @deepcode/core's `package.json` engines field requires >=22 too. | |
| node-version: '22' | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| # Linux only: install bubblewrap + slirp4netns so the real-kernel sandbox | |
| # integration tests run (they skip when `bwrap` is absent, e.g. macOS/dev). | |
| # Ubuntu 24.04 restricts unprivileged user namespaces via AppArmor — relax | |
| # it so bwrap can unshare namespaces on the runner. | |
| - name: Install sandbox tools (Linux) | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y bubblewrap slirp4netns curl | |
| sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 || true | |
| - name: Typecheck | |
| run: pnpm typecheck | |
| - name: Lint | |
| run: pnpm lint | |
| - name: Format check | |
| run: pnpm format:check | |
| - name: Test | |
| run: pnpm test | |
| - name: Build | |
| run: pnpm build | |
| link-check: | |
| name: Docs link check | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Verify required docs exist | |
| run: | | |
| for f in README.md CONTRIBUTING.md SECURITY.md \ | |
| docs/DEVELOPMENT_PLAN.md docs/VISUAL_DESIGN.html \ | |
| docs/design/sandbox-plan-worktree.md \ | |
| docs/design/plugin-security.md \ | |
| docs/design/effort-levels.md; do | |
| test -f "$f" || { echo "MISSING: $f"; exit 1; } | |
| done | |
| echo "All M0 docs present" |