-
-
Notifications
You must be signed in to change notification settings - Fork 188
37 lines (34 loc) · 1.17 KB
/
actions.yml
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
name: Integration
on:
push:
branches-ignore:
- master
pull_request:
branches-ignore:
- master
jobs:
Action:
name: Test Inspector Action
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Make changes to schema
run: |
sed -i '/title: String @deprecated(reason: "No more used")/d' ./example/schemas/schema.graphql
sed -i 's/createdAt: String/createdAt: String!/g' ./example/schemas/schema.graphql
sed -i 's/modifiedAt: String/modifiedAt: String!/g' ./example/schemas/schema.graphql
sed -i 's/post: Post!/post(id: ID): Post!/g' ./example/schemas/schema.graphql
cat ./example/schemas/schema.graphql
- name: Run Inspector
uses: ./
id: inspector
with:
experimental_merge: false
schema: 'master:example/schemas/schema.graphql'
rules: |
suppressRemovalOfDeprecatedField
./example/rules/custom-rule.js
- name: Validate result
if: steps.inspector.outputs.changes != 4
run: echo 'Expected 4 changes received ${{ steps.inspector.outputs.changes }}' && exit 1