Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 36 additions & 5 deletions .github/workflows/upstream-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,28 @@ jobs:
- name: Apply safe upstream update
run: node scripts/sync-upstream.mjs --apply

- name: Validate plugin manifest
run: npm run validate

- name: Verify package
run: npm run verify

# A new upstream skill needs a README row that only a person can write, so a docs failure opens a draft
# pull request to add it on instead of failing the run.
- name: Check docs
id: docs
continue-on-error: true
shell: bash
run: npm run -s check:docs 2>&1 | tee "$RUNNER_TEMP/docs-check.txt"

- name: Test updater
run: npm run test:sync

- name: Test skill scripts
run: |
npm install --no-save --prefix skills/statechart/scripts
npm run test:skills

- name: Set up Bun
uses: oven-sh/setup-bun@v2

Expand All @@ -46,15 +62,30 @@ jobs:
bun install --cwd skills/statechart-dashboard/scripts --frozen-lockfile
bun test skills/statechart-dashboard/scripts

- name: Write pull request body
shell: bash
run: |
{
echo "Automated update from the pinned authoritative Cursor pstack source."
echo
echo "The updater three-way merges OMP adaptations with upstream and fails"
echo "before opening a pull request when they conflict."
if [ "${{ steps.docs.outcome }}" = failure ]; then
echo
echo "The docs check failed. Fix README.md on this branch before merging:"
echo
echo '```text'
cat "$RUNNER_TEMP/docs-check.txt"
echo '```'
fi
} > "$RUNNER_TEMP/pr-body.md"

- name: Open update pull request
uses: peter-evans/create-pull-request@v7
with:
commit-message: "chore: sync upstream pstack"
title: "chore: sync upstream pstack"
body: |
Automated update from the pinned authoritative Cursor pstack source.

The updater three-way merges OMP adaptations with upstream and fails
before opening a pull request when they conflict.
body-path: ${{ runner.temp }}/pr-body.md
draft: ${{ steps.docs.outcome == 'failure' && 'always-true' || 'false' }}
branch: automation/upstream-pstack
delete-branch: true
49 changes: 49 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Validate package

on:
pull_request:
push:
branches:
- main

permissions:
contents: read

jobs:
validate:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 22

- name: Install dependencies
run: npm install --no-save --prefix skills/statechart/scripts

- name: Validate plugin manifest
run: npm run validate

- name: Verify package
run: npm run verify

- name: Check docs
run: npm run check:docs

- name: Test updater
run: npm run test:sync

- name: Test skill scripts
run: npm run test:skills

- uses: oven-sh/setup-bun@v2

- name: Test bundled scripts
run: |
bun install --cwd skills/poteto-mode/scripts --frozen-lockfile
bun test watch-pr check-plan.test.ts
bunx tsc --project skills/poteto-mode/scripts/watch-pr/tsconfig.json --noEmit --strict
bun install --cwd skills/statechart-dashboard/scripts --frozen-lockfile
bun test skills/statechart-dashboard/scripts
Loading
Loading