Skip to content

chore: release obsidian@2.1.0-beta.1 #46

chore: release obsidian@2.1.0-beta.1

chore: release obsidian@2.1.0-beta.1 #46

Workflow file for this run

name: CI
on:
pull_request:
branches: [main, next]
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
submodules: recursive
# `mise run init` installs deps (frozen lockfile) and builds packages/* —
# so no separate install step is needed. `--no-submodules` skips checkout
# since actions/checkout already fetched them above.
- uses: jdx/mise-action@v4
# Restores the pnpm store (keyed on pnpm-lock.yaml) before the install
# inside `mise run init`. pnpm itself is activated by mise's corepack
# post-install, so this step no-ops on install and is here for the cache.
- uses: pnpm/action-setup@v6
with:
cache: true
- run: mise run init --no-submodules
# Persist Turborepo's local cache (.turbo) across runs so unchanged
# build/test tasks restore instead of recomputing. github.sha makes each
# run save a fresh entry; restore-keys fall back to the most recent cache.
- name: Turborepo cache
uses: actions/cache@v5
with:
path: .turbo
key: turbo-${{ runner.os }}-${{ github.sha }}
restore-keys: |
turbo-${{ runner.os }}-
- name: Format check
run: |
if ! pnpm exec oxfmt --check; then
{
echo "### Unformatted files"
echo '```'
pnpm exec oxfmt --list-different
echo '```'
} >> "$GITHUB_STEP_SUMMARY"
exit 1
fi
# The `zt` template contract generates from the TS types (ADR 0015), so a
# contract change that lands without regenerated artifacts must fail here.
- name: Contract artifacts check
run: |
pnpm --filter @zotlit/db generate:contract
# --porcelain also reports a regenerated file the commit deleted,
# which `git diff` leaves untracked and therefore silent.
stale=$(git status --porcelain -- packages/db/src/contract/generated)
if [ -n "$stale" ]; then
{
echo "### Stale contract artifacts"
echo 'Run `pnpm --filter @zotlit/db generate:contract` and commit the result.'
echo '```'
echo "$stale"
echo '```'
} >> "$GITHUB_STEP_SUMMARY"
exit 1
fi
# The template-data reference page is generated from the contract IR the
# previous step just regenerated, so a contract change without a
# regenerated page must fail here. Call the generator script directly,
# not the turbo task, because a freshness check must always regenerate
# rather than restore a cached output. `mise run init` above builds the
# packages the script imports.
- name: Template data page check
run: |
pnpm --filter @zotlit/docs generate:template-data
stale=$(git status --porcelain -- apps/docs/content/docs/reference/templates/data.mdx)
if [ -n "$stale" ]; then
{
echo "### Stale template data page"
echo 'Run `pnpm --filter @zotlit/docs generate:template-data` and commit the result.'
echo '```'
echo "$stale"
echo '```'
} >> "$GITHUB_STEP_SUMMARY"
exit 1
fi
# oxlint.base.ts sets typeAware + typeCheck, so `-f github` emits ::error
# workflow commands → inline annotations on the diff, type errors included.
# turbo's dependsOn handles transitive builds (no explicit build step).
- name: Lint
run: pnpm lint -- -f github
# Vitest's `github-actions` reporter emits ::error for inline test
# annotations; `default` provides console output. Reporters are passed
# via turbo passthrough.
- name: Test
run: pnpm turbo run test -- --reporter=default --reporter=github-actions