Skip to content

release: v2.1.2

release: v2.1.2 #1290

Workflow file for this run

name: CI
on:
pull_request:
push:
branches: [main]
concurrency:
group: ci-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6
with:
fetch-depth: 0
- uses: jdx/mise-action@2d8d4cafcbd33be2ea37d2b6f5ad595363d1f1ca # v5
with:
minimum_release_age: 0s
- run: bun install --frozen-lockfile
- name: Install the locked OC1 config dependency fixture
run: npm ci --prefix packages/e2e-tests/fixtures/opencode1-config-deps --ignore-scripts --no-audit --no-fund
- run: bun run check:workspace-lock
- run: bun run types
- run: bun run build
- run: bun test --cwd packages/opencode scripts/check-bundle-globals.test.ts
- run: bun test scripts/windows packages/opencode/scripts/runtime-packaging.test.ts
- run: bun test scripts/check-pi-dist-imports.test.ts
- run: bun run check:pi-dist-imports
- run: bun run --cwd packages/core test:scripts
- run: bun test scripts/tests/run-mutation-ci.test.ts scripts/tests/run-mutation-bun.test.ts
- run: bun run check:claustrum-golden
env:
GITHUB_TOKEN: ${{ github.token }}
# The vendored Claude OAuth wire vectors must stay byte-identical to
# cortexkit/commons at the commit pinned in their SOURCE file, the only
# place the pin lives.
- name: Verify vendored Claude OAuth wire vectors match commons
run: |
set -euo pipefail
dir=packages/opencode/src/tests/fixtures/claude-oauth-wire
read_key() { sed -n "s/^$1=//p" "$dir/SOURCE"; }
repo="$(read_key repository)"
commit="$(read_key commit)"
path="$(read_key path)"
if [[ -z "$repo" || -z "$path" || ! "$commit" =~ ^[0-9a-f]{40}$ ]]; then
echo "::error file=$dir/SOURCE::SOURCE must set repository, path and a 40-hex commit"
exit 1
fi
commons="$(mktemp -d)"
git -C "$commons" init -q
git -C "$commons" fetch -q --depth 1 "$repo" "$commit"
status=0
for file in README.md vectors.json SHA256SUMS; do
if ! git -C "$commons" show "FETCH_HEAD:$path/$file" | cmp -s - "$dir/$file"; then
echo "::error file=$dir/$file::$dir/$file differs from $repo at $commit ($path/$file). Copy it byte for byte with git show $commit:$path/$file, or bump the commit in $dir/SOURCE together with all three files."
status=1
fi
done
if [ "$status" = 0 ]; then
echo "claude-oauth-wire: README.md, vectors.json and SHA256SUMS match $repo at $commit"
fi
exit "$status"
- run: bun test scripts/check-test-count-floors.test.ts
# UNCHECKED exits nonzero too: a missing merge target must not look green.
- name: Verify unit-count floors
env:
FLOOR_BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }}
run: |
if [[ ! "$FLOOR_BASE_SHA" =~ ^[0-9a-f]{40}$ || "$FLOOR_BASE_SHA" == 0000000000000000000000000000000000000000 ]]; then
echo "::error::Unit-count floor verification requires a nonzero event base SHA."
exit 1
fi
bun scripts/check-test-count-floors.ts --base-ref "$FLOOR_BASE_SHA"
- run: bun run --cwd packages/opencode smoke:tui
env:
TUI_SMOKE_SKIP_BUILD: "1"
- run: bun run test:pi-host
- run: bun run test:e2e
env:
ANTHROPIC_AUTH_E2E_OPENCODE_CONFIG_DEPS: ${{ github.workspace }}/packages/e2e-tests/fixtures/opencode1-config-deps
- run: scripts/check-cortexkit-layout.sh
- run: bun run format:check
- run: bun run lint