diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 8b1553d..ad4761a 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -9,4 +9,19 @@ jobs: runs-on: debian-latest steps: - uses: actions/checkout@v4 - - run: test -f README.md && test -f AGENTS.md && test -f docs/versioning.md + - uses: actions/setup-node@v4 + with: + node-version: 22 + - name: Validate repository documentation + run: test -f README.md && test -f AGENTS.md && test -f docs/versioning.md + - name: Validate JSON contracts and fixtures + run: | + node --input-type=module <<'NODE' + import { readdir, readFile } from 'node:fs/promises'; + for (const directory of ['contracts/v1', 'fixtures/v1']) { + for (const name of await readdir(directory)) { + if (!name.endsWith('.json')) continue; + JSON.parse(await readFile(`${directory}/${name}`, 'utf8')); + } + } + NODE