Files
noitu/.github/workflows/proto.yml
T
tiennm99 557de1af94 refactor: remove unused knobs, strings and stale text
Drop what nothing uses any more: the --max-syllables flag with its
sourceSpec field, meta row and reject reason; the store's clearRejection;
the --gap CSS token; three orphaned i18n strings; two exports with no
importer; the preview npm script; the proto.yml "baseline exists" step
that has been unconditionally true since the schema landed on main; and
two root-level .gitignore entries for paths Playwright never writes.

Correct text that outlived its subject: NOTICE named a tools/ directory
that never existed, the README still pointed at the first plan and
carried a migration note for retired sources, and a few comments still
said "release" for an upstream that is a weekly export. The pin test
header now says three copies and also holds README and ATTRIBUTION to
the same URL; the Make-targets table lists clean and help.

Wire fixtures regenerated so client_hello uses the ProtocolVersion
constant and server_game_started carries the 30s turn limit.
builder_version becomes 4 for the dropped meta row.
2026-09-08 18:01:37 +07:00

62 lines
1.9 KiB
YAML

# Guards the WebSocket wire contract: the schema is well-formed, it has not
# broken compatibility, and the committed generated code matches it.
#
# The suites that decode the cross-language fixtures run in ci.yml, where the
# rest of the tests are. Nothing here downloads the upstream wordlist.
name: proto
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
contract:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# buf breaking compares against main, which needs real history.
fetch-depth: 0
- uses: bufbuild/buf-setup-action@v1
with:
version: 1.69.0
- uses: actions/setup-go@v5
with:
go-version-file: server/go.mod
cache-dependency-path: server/go.sum
- uses: actions/setup-node@v4
with:
node-version: 24
cache: npm
cache-dependency-path: web/package-lock.json
- run: npm ci
working-directory: web
- name: Lint the schema
run: buf lint
# ref=origin/main, not branch=main: a pull_request checkout is a detached
# HEAD with no local main, and branch=main fails there with a git clone
# error rather than a breaking-change report.
- name: Reject breaking changes
run: buf breaking --against '.git#ref=origin/main'
# A committed generated tree that no longer matches the schema is worse
# than no generated tree at all: it compiles, and it is wrong.
# --intent-to-add first: git diff ignores untracked files, so without it
# a plugin that starts emitting a new file passes this check while the
# committed tree is incomplete.
- name: Verify the committed generated code is in sync
run: |
buf generate
git add --intent-to-add -- server/gen web/src/lib/proto
git diff --exit-code -- server/gen web/src/lib/proto