Adds `Dexcord.Api.Coverage`, a testable core that diffs the compiled endpoint route table against a pinned snapshot of Discord's official OpenAPI spec (`priv/discord_openapi.json`). The spec is a coverage CHECKLIST, not codegen input: it is refreshed only by the deliberate `mix dexcord.coverage.refresh`, so upstream churn never breaks CI spontaneously. - `mix dexcord.coverage` compiles then exits non-zero on any in-scope endpoint missing from the declared surface (AC1.8/AC1.9). - `mix dexcord.coverage.refresh` pins the spec via :httpc + castore, adding inets/ssl to the code path since Mix prunes them. - `priv/coverage_allowlist.exs` records out-of-scope spec routes with a comment per family; reconciled against the real pin (Social SDK lobbies/partner-sdk, OIDC, application-by-id, scheduled-event exceptions, join requests, thread search, monetization). - `.gitea/workflows/ci.yml` runs the suite + gate (Actions must be enabled on the Gitea remote). - ratelimit_test.exs gains AC1.10 spot-checks proving the new Phase 5 route shapes collapse to bounded, id-collapsed keys.
14 lines
311 B
YAML
14 lines
311 B
YAML
name: ci
|
|
on: [push, pull_request]
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: erlef/setup-beam@v1
|
|
with:
|
|
elixir-version: "1.18"
|
|
otp-version: "27"
|
|
- run: mix deps.get
|
|
- run: mix test
|
|
- run: mix dexcord.coverage
|