Skip to content

The update button opens a window with the patch notes, Cancel and Install; built once in core (#28) #46

The update button opens a window with the patch notes, Cancel and Install; built once in core (#28)

The update button opens a window with the patch notes, Cancel and Install; built once in core (#28) #46

Workflow file for this run

# The gate on every pull request, and on main as a backstop: typecheck, lint,
# unit tests. Same three that release.yml runs before it ships, so a green PR
# cannot turn red on merge.
#
# The e2e suite deliberately does NOT run here. It drives real windows and real
# shells on the dev machine, which a runner does not have; it stays the local
# pre-PR gate (CLAUDE.md).
name: ci
on:
pull_request:
push:
branches: [main]
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- run: npm ci
- run: npm run typecheck
- run: npm run lint
- run: npm test
# A CORE CHANGE NEEDS A NEW CORE VERSION (#23). core-release.yml tags
# core-v<version> on merge and never moves a tag, so a PR that changes core/
# under a version that is already released would fail AFTER the merge, on
# main. It fails here instead, where it can still be fixed.
core-version:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: |
set -euo pipefail
base="origin/${{ github.base_ref }}"
if git diff --quiet "$base"...HEAD -- core/; then
echo "core/ is untouched."
exit 0
fi
version=$(node -p "require('./core/package.json').version")
tag="core-v$version"
git fetch -q --tags origin
if ! git rev-parse -q --verify "refs/tags/$tag" >/dev/null; then
echo "core/ changed and $tag is a new version. Good."
exit 0
fi
git subtree split --prefix=core -b core-check >/dev/null
if [ "$(git rev-parse "$tag^{tree}")" = "$(git rev-parse 'core-check^{tree}')" ]; then
echo "core/ matches the released $tag."
exit 0
fi
echo "::error::core/ changed, but core/package.json still says $version and $tag is already released with different contents. Bump the version in core/package.json."
exit 1