From 01cd2ed84ddb7c48d160b91b9446b1751e824473 Mon Sep 17 00:00:00 2001 From: Joel Lappalainen Date: Fri, 17 Jan 2025 16:46:52 +0200 Subject: [PATCH] Add workflow for validating schema changes --- .github/workflows/schema-validation.yml | 41 +++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/schema-validation.yml diff --git a/.github/workflows/schema-validation.yml b/.github/workflows/schema-validation.yml new file mode 100644 index 00000000000..578b9315dab --- /dev/null +++ b/.github/workflows/schema-validation.yml @@ -0,0 +1,41 @@ +name: Validate schema changes + +on: + pull_request_target: + types: + - opened + - synchronize + 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 + 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 + + - 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 \ No newline at end of file