Files
runicnpc-rust/.gitea/workflows/pr-checks.yml
wtclaude 249f2e513f
All checks were successful
PR Checks / plugin-checks (pull_request) Successful in -1m44s
feat: stage 0, an empty RunicNPC that releases through CI
The repository RunicNPC is built in (docs/runicnpc/PLAN.md §9, stage 0):

- plugin/RunicNPC.cs: `// Requires: Kits` (D217), `[Info]` with the 0.0.0
  placeholder the release stamps, `RunicNpc_ApiVersion()` (API 1), and
  `rnpc.status`, which reports the version and which hooks have fired. It
  spawns nothing.
- plugin.toml: the API version, the framework floors it was loaded on
  (Oxide 2.0.7726, Carbon 2.0.259) and requires_plugins = ["Kits"].
- scripts/checkPlugin.js, adapted from Rust-Plugins': every hook listed and
  void unless written down; chat-command signatures; every RunicNpc_ call
  reachable by Call (the HumanNPC trap, PLAN.md §1.2); ApiVersion,
  `// Requires:` and [Info] agreeing with plugin.toml. 23 self-tests, including
  the real plugin and a CRLF checkout.
- PR Checks on PRs into main and edge; the release workflow on main, with
  Rust-Plugins' release engine unchanged and an adapter that ships
  runicnpc-<ver>.tar.gz (runicnpc/RunicNPC.cs + manifest.json) and SHA256SUMS.
  No bundle dispatch until stage 4.
- tools/: the rig panel scripts, with the panel and server ids moved into a
  git-ignored tools/rigs.json. `con.js` became `console.js`: CON is a reserved
  device name on Windows, and git there cannot open the file.
- README, CONTRIBUTING (edge-based flow, AI disclosure, borrow-not-copy),
  SECURITY, the code of conduct, issue and PR templates.

`feat:` so the cutover to main cuts the first release, 0.1.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
2026-09-29 21:01:49 -05:00

60 lines
2.3 KiB
YAML

# Gate every pull request into `main` and `edge`.
#
# RunicNPC cannot be compiled by CI: it is deployed as SOURCE and built by Oxide
# or Carbon against game assemblies that exist only on a Rust server, so a build
# job is not available at any price.
#
# What is available is a reader, and the mistakes worth reading for are the ones
# both frameworks make silent. Hooks, chat commands and `Call` targets bind by
# name through reflection, with no compile-time check and no warning when a name
# matches nothing. `scripts/checkPlugin.js` asks, dependency-free:
#
# • every hook is listed in `ExpectedHooks`, so `rnpc.status` can report it;
# • every hook is void unless answering is written down with a reason;
# • every chat command has the signature the frameworks bind;
# • every `RunicNpc_*` API call is one Oxide's `Call` can reach;
# • `ApiVersion`, `// Requires:` and `[Info]` agree with plugin.toml, which is
# what the release copies into the manifest the installer reads.
#
# Its own test suite breaks it every way it claims to catch — including the
# failure that would make every other case meaningless, a parser that silently
# matches nothing.
#
# Enforcement (one-time, in the Gitea UI):
# Repository Settings → Branches → Branch Protection (rules for `main`, `edge`)
# • Enable Status Check
# • Status check patterns: PR Checks / *
# Gitea only lists a context after it has reported once; the glob matches
# without the dropdown and keeps matching as jobs are added.
name: PR Checks
on:
pull_request:
branches: [main, edge]
concurrency:
group: pr-checks-${{ github.ref }}
cancel-in-progress: true
jobs:
plugin-checks:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
# No install step: the checks are dependency-free on purpose, which is also
# how a contributor runs them.
- name: Check the plugin's hooks, API and declarations
run: node scripts/checkPlugin.js
# Named individually rather than `node --test scripts/`: directory mode is
# not portable across the Node versions this project runs on.
- name: Test the checker itself
run: node --test scripts/checkPlugin.test.js