forked from opentripplanner/OpenTripPlanner
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (48 loc) · 2.08 KB
/
schema-validation.yml
File metadata and controls
61 lines (48 loc) · 2.08 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
name: Validate schema changes
on:
pull_request:
branches:
- dev-2.x
# We have to run this on merge_group despite it doing nothing since otherwise this required check isn't "successful"
merge_group:
branches:
- dev-2.x
jobs:
validate-gtfs-schema:
if: github.repository_owner == 'opentripplanner' && github.event_name == 'pull_request'
name: Validate GTFS GraphQL schema changes
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: 'Fetch dev.2.x for diffing'
run: |
git fetch origin dev-2.x --depth 1
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Install GraphQL Inspector
run: |
npm i --global @graphql-inspector/ci graphql @graphql-inspector/diff-command @graphql-inspector/graphql-loader @graphql-inspector/git-loader
- name: Validate GTFS GraphQL schema changes
run: |
graphql-inspector diff 'git:origin/dev-2.x:application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls' 'application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls'
validate-transmodel-schema:
if: github.repository_owner == 'opentripplanner' && github.event_name == 'pull_request'
name: Validate Transmodel GraphQL schema changes
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: 'Fetch dev.2.x for diffing'
run: |
git fetch origin dev-2.x --depth 1
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Install GraphQL Inspector
run: |
npm i --global @graphql-inspector/ci graphql @graphql-inspector/diff-command @graphql-inspector/graphql-loader @graphql-inspector/git-loader
- name: Validate Transmodel GraphQL schema changes
run: |
graphql-inspector diff 'git:origin/dev-2.x:application/src/main/resources/org/opentripplanner/apis/transmodel/schema.graphql' 'application/src/main/resources/org/opentripplanner/apis/transmodel/schema.graphql'