Make bootstrap deterministic across profile flag order and stale local runtime state so onboarding and health checks converge on the intended profile, gateway service, and web port.
66 lines
2.0 KiB
YAML
66 lines
2.0 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
concurrency:
|
|
group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
jobs:
|
|
# check:
|
|
# name: "check"
|
|
# runs-on: ubuntu-latest
|
|
# steps:
|
|
# - name: Checkout
|
|
# uses: actions/checkout@v4
|
|
# with:
|
|
# submodules: false
|
|
#
|
|
# - name: Setup Node environment
|
|
# uses: ./.github/actions/setup-node-env
|
|
#
|
|
# - name: Check types and lint and oxfmt
|
|
# run: pnpm check
|
|
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- runtime: node
|
|
command: pnpm canvas:a2ui:bundle && pnpm test
|
|
- runtime: bootstrap
|
|
command: pnpm vitest run --config src/cli/vitest.config.ts src/cli/profile.test.ts src/cli/bootstrap-external.test.ts src/cli/bootstrap-external.bootstrap-command.test.ts
|
|
- runtime: bun
|
|
command: pnpm canvas:a2ui:bundle && bunx vitest run --config vitest.unit.config.ts
|
|
steps:
|
|
- name: Skip bun lane on push
|
|
if: github.event_name == 'push' && matrix.runtime == 'bun'
|
|
run: echo "Skipping bun test lane on push events."
|
|
|
|
- name: Checkout
|
|
if: github.event_name != 'push' || matrix.runtime != 'bun'
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: false
|
|
|
|
- name: Setup Node environment
|
|
if: matrix.runtime != 'bun' || github.event_name != 'push'
|
|
uses: ./.github/actions/setup-node-env
|
|
with:
|
|
install-bun: "${{ matrix.runtime == 'bun' }}"
|
|
|
|
- name: Configure Node test resources
|
|
if: matrix.runtime == 'node'
|
|
run: |
|
|
echo "OPENCLAW_TEST_WORKERS=2" >> "$GITHUB_ENV"
|
|
echo "OPENCLAW_TEST_MAX_OLD_SPACE_SIZE_MB=8192" >> "$GITHUB_ENV"
|
|
|
|
- name: Run tests (${{ matrix.runtime }})
|
|
if: github.event_name != 'push' || matrix.runtime != 'bun'
|
|
run: ${{ matrix.command }}
|