-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (33 loc) · 1.11 KB
/
graphql-schema-diff.yml
File metadata and controls
36 lines (33 loc) · 1.11 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
name: GraphQL schema compatibility check
on:
push:
branches:
- main
- schema-diff
jobs:
test:
name: Compare schema against Ruby Intercode
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- uses: actions/setup-node@v4
- run: npm install @graphql-tools/load @graphql-tools/url-loader @graphql-tools/graphql-file-loader @graphql-inspector/core lodash
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: sudo apt-get update && sudo apt-get install -y protobuf-compiler
- run: cargo run export-schema >schema.graphql
- id: schema_diff
run: |
echo 'MARKDOWN<<EOF' >>$GITHUB_OUTPUT
node ./.github/graphql-schema-diff.js >>$GITHUB_OUTPUT
echo 'EOF' >>$GITHUB_OUTPUT
- uses: actions/github-script@v6
with:
script: |
github.rest.issues.update({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: 83,
body: ${{ steps.schema_diff.outputs.MARKDOWN }}
})