Files
plugins/.github/workflows/pr.yml
T
yetoneandClaude Opus 5.5 2b0b2d9401 ci: a pull request runs the tests and fails while a package in it isn't on npm yet (#52)
Trusted publishing can't create a package, so #39's block-patterns,
merged before its first version was on npm, left every publish run on
main red after it (8 runs, the last 37781353941), and a real refused
publish would have hidden behind it. pr.yml runs bun test and check.mjs
on each pull request, and scripts/new-to-npm.sh names any package npm
doesn't know, so its first version is published by hand and its Trusted
Publisher set before the merge. The README's market section says so.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 21:59:38 +08:00

36 lines
899 B
YAML

# Checks a pull request before it is merged: the tests publish.yml runs, and
# that every package is on npm already (scripts/new-to-npm.sh). A new
# package merged first turned every publish run red (#39's block-patterns).
name: pr
on:
pull_request:
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- uses: actions/setup-node@v4
with:
node-version: 24
- name: test
# the tests refuse a real home: no real sign-in is ever read
run: HOME=$(mktemp -d) bun test
- name: check
run: bun scripts/check.mjs
on-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
- name: every package is on npm
run: scripts/new-to-npm.sh