-
Notifications
You must be signed in to change notification settings - Fork 997
65 lines (56 loc) · 2.1 KB
/
Copy patherror-reference-check.yml
File metadata and controls
65 lines (56 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Error Reference Check
# The published error-reference pages must list every structured error code
# the products can emit — prisma/prisma (main) errors link to
# /docs/orm/reference/error-reference#<CODE>, prisma/prisma-cli (main) errors
# to /docs/cli/error-reference#<CODE>. This check fails if any known code is
# missing from its page, even if the sync workflow breaks.
#
# Runs on pushes to main, on PRs that touch the page or its tooling, and on a
# daily schedule so drift introduced upstream is flagged without blocking
# unrelated PRs.
on:
push:
branches: [main]
pull_request:
paths:
- apps/docs/content/docs/orm/reference/error-reference.mdx
- apps/docs/content/docs/cli/error-reference.mdx
- apps/docs/scripts/generate-error-reference.mjs
- .github/workflows/error-reference-check.yml
- .github/workflows/sync-error-reference-docs.yml
schedule:
- cron: "30 6 * * *"
workflow_dispatch:
permissions:
contents: read
jobs:
verify:
name: Verify error-reference completeness
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Checkout prisma/prisma (main)
uses: actions/checkout@v4
with:
repository: prisma/prisma
ref: main
path: prisma-src
persist-credentials: false
- name: Checkout prisma/prisma-cli (main)
uses: actions/checkout@v4
with:
repository: prisma/prisma-cli
ref: main
path: prisma-cli-src
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "24"
- name: Verify ORM page lists every known error code
run: node prisma-src/scripts/list-error-codes.mjs --root prisma-src --verify apps/docs/content/docs/orm/reference/error-reference.mdx
- name: Verify CLI page lists every known error code
run: node prisma-cli-src/scripts/list-error-codes.mjs --root prisma-cli-src --verify apps/docs/content/docs/cli/error-reference.mdx