|
| 1 | +name: engine-ci |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [main] |
| 6 | + pull_request: |
| 7 | + |
| 8 | +permissions: |
| 9 | + contents: read |
| 10 | + |
| 11 | +jobs: |
| 12 | + go: |
| 13 | + runs-on: ubuntu-latest |
| 14 | + steps: |
| 15 | + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 |
| 16 | + with: |
| 17 | + persist-credentials: false |
| 18 | + - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5 |
| 19 | + with: |
| 20 | + go-version-file: go.mod |
| 21 | + - run: go build ./... |
| 22 | + - run: go vet ./... |
| 23 | + - run: go test ./... |
| 24 | + |
| 25 | + typescript: |
| 26 | + runs-on: ubuntu-latest |
| 27 | + steps: |
| 28 | + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 |
| 29 | + with: |
| 30 | + persist-credentials: false |
| 31 | + - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5 |
| 32 | + with: |
| 33 | + go-version-file: go.mod |
| 34 | + - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0 |
| 35 | + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 |
| 36 | + with: |
| 37 | + node-version: 22 |
| 38 | + cache: pnpm |
| 39 | + # Ubuntu 23.10+ runners restrict unprivileged user namespaces via |
| 40 | + # AppArmor; the agent sandbox tests exercise the real userns sandbox. |
| 41 | + - name: Allow unprivileged user namespaces for sandbox tests |
| 42 | + run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 |
| 43 | + # The CLI conformance suite needs the real proxy; building it here with |
| 44 | + # the cached Go toolchain keeps the test inside its 90s budget. |
| 45 | + - name: Prebuild caveman-proxy for conformance tests |
| 46 | + run: go build -o "$RUNNER_TEMP/caveman-proxy" ./proxy/cmd/caveman-proxy |
| 47 | + - run: pnpm install --frozen-lockfile |
| 48 | + - run: pnpm -r build |
| 49 | + - run: pnpm -r test |
| 50 | + env: |
| 51 | + CAVEMAN_TEST_PROXY_BIN: ${{ runner.temp }}/caveman-proxy |
| 52 | + |
| 53 | + python: |
| 54 | + runs-on: ubuntu-latest |
| 55 | + steps: |
| 56 | + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 |
| 57 | + with: |
| 58 | + persist-credentials: false |
| 59 | + - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 |
| 60 | + with: |
| 61 | + python-version: "3.13" |
| 62 | + - run: python -m pip install pytest |
| 63 | + - run: python -m pytest -q |
| 64 | + working-directory: packages/sdk/python |
| 65 | + |
| 66 | + root-surfaces: |
| 67 | + runs-on: ubuntu-latest |
| 68 | + steps: |
| 69 | + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 |
| 70 | + with: |
| 71 | + persist-credentials: false |
| 72 | + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 |
| 73 | + with: |
| 74 | + node-version: 22 |
| 75 | + - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 |
| 76 | + with: |
| 77 | + python-version: "3.13" |
| 78 | + - run: python -m pip install pytest==9.0.3 |
| 79 | + - run: npm test |
| 80 | + - run: node --test tests/*.js |
| 81 | + - run: python -m unittest discover -s tests -p 'test_*.py' |
| 82 | + env: |
| 83 | + XDG_DATA_HOME: ${{ runner.temp }}/caveman-xdg |
| 84 | + - run: python -m pytest -q tests |
| 85 | + working-directory: mem/py |
| 86 | + - run: python tests/verify_repo.py |
| 87 | + |
| 88 | + extension: |
| 89 | + runs-on: ubuntu-latest |
| 90 | + defaults: |
| 91 | + run: |
| 92 | + working-directory: extension |
| 93 | + steps: |
| 94 | + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 |
| 95 | + with: |
| 96 | + persist-credentials: false |
| 97 | + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 |
| 98 | + with: |
| 99 | + node-version: 22 |
| 100 | + cache: npm |
| 101 | + cache-dependency-path: extension/package-lock.json |
| 102 | + - run: npm ci |
| 103 | + - run: npx playwright install --with-deps chromium |
| 104 | + - run: npm run package |
| 105 | + |
| 106 | + windows: |
| 107 | + runs-on: windows-latest |
| 108 | + steps: |
| 109 | + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 |
| 110 | + with: |
| 111 | + persist-credentials: false |
| 112 | + - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5 |
| 113 | + with: |
| 114 | + go-version-file: go.mod |
| 115 | + - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0 |
| 116 | + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 |
| 117 | + with: |
| 118 | + node-version: 22 |
| 119 | + cache: pnpm |
| 120 | + - run: pnpm install --frozen-lockfile |
| 121 | + - run: go test ./... |
| 122 | + - run: npm test |
| 123 | + - run: pnpm --dir packages/subagent-tax test |
| 124 | + - run: npm run test:windows |
0 commit comments