Skip to content

Commit

Permalink
Use node to run validation
Browse files Browse the repository at this point in the history
  • Loading branch information
optionsome committed Jan 20, 2025
1 parent 01cd2ed commit 5124ec9
Showing 1 changed file with 15 additions and 24 deletions.
39 changes: 15 additions & 24 deletions .github/workflows/schema-validation.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,32 @@
name: Validate schema changes

on:
pull_request_target:
types:
- opened
- synchronize
pull_request:
branches:
- dev-2.x

jobs:
validate-gtfs:
if: github.repository_owner == 'opentripplanner'
name: Validate GraphQL schema changes
permissions:
contents: read
pull-requests: write
checks: write
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
- uses: kamilkisiela/graphql-inspector@master

- uses: actions/setup-node@v4
with:
name: Validate GTFS GraphQL schema changes
schema: 'dev-2.x:application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls'
annotations: false
fail-on-breaking: true
rules: |
ignoreDescriptionChanges
node-version: 22

- name: Install GraphQL Inspector
run: |
npm i --global @graphql-inspector/diff-command @graphql-inspector/graphql-loader @graphql-inspector/git-loader
- uses: kamilkisiela/graphql-inspector@master
with:
name: Validate Transmodel GraphQL schema changes
schema: 'dev-2.x:application/src/main/resources/org/opentripplanner/apis/transmodel/schema.graphql'
annotations: false
fail-on-breaking: true
rules: |
ignoreDescriptionChanges
- 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'
- 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'

0 comments on commit 5124ec9

Please sign in to comment.