Skip to content

Commit

Permalink
Merge pull request #19 from znsio/add_graphql_backward_compatibility_…
Browse files Browse the repository at this point in the history
…check

Added the GraphQLS backward compatibility check
  • Loading branch information
joelrosario authored Jul 11, 2024
2 parents fe9ec80 + 219e70a commit da75945
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/pull_request_merge_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,14 @@ jobs:
in/**/*.yml
in/**/*.json
files_ignore: kafka.yaml #skipping it as async is under private-beta


- name: Get changed GraphQLS files
id: changed-graphqls-files
uses: tj-actions/changed-files@v34
with:
files: |
in/**/*.graphqls
- name: Install Spectral Linter
if: steps.changed-files-specific.outputs.any_changed == 'true'
run: npm install -g @stoplight/spectral-cli
Expand All @@ -51,11 +58,19 @@ jobs:
echo "GITHUB_HEAD_REF=${{ github.head_ref }}" >> env.list
echo "GITHUB_BASE_REF=${{ github.base_ref }}" >> env.list
- name: Run backward compatibility check on changed files
- name: Run OpenAPI backward compatibility check on changed files
if: steps.changed-files-specific.outputs.any_changed == 'true'
run: |
docker run -v "$(pwd):/central-contract-repo:rw" \
--env-file env.list \
--entrypoint /bin/sh znsio/specmatic \
-c "git config --global --add safe.directory /central-contract-repo && cd /central-contract-repo && java -jar /usr/src/app/specmatic.jar backwardCompatibilityCheck"
- name: Run GraphQL backward compatibility check on changed files
if: steps.changed-graphqls-files.outputs.any_changed == 'true'
run: |
docker run -v "$(pwd):/central-contract-repo:rw" \
--env-file env.list \
--entrypoint /bin/sh \
znsio/specmatic-graphql-trial \
-c "git config --global --add safe.directory /central-contract-repo && cd /central-contract-repo && java -jar /usr/bin/specmatic-graphql.jar backwardCompatibilityCheck"
1 change: 0 additions & 1 deletion in/specmatic/examples/store/products-bff-api.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,3 @@ input NewProductInput {
inventory: Int!
type: ProductType!
}

0 comments on commit da75945

Please sign in to comment.