-
Notifications
You must be signed in to change notification settings - Fork 44
35 lines (33 loc) · 1.06 KB
/
subgraph-check.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
name: Schema check
on:
pull_request:
branches: [ main ]
paths:
- "subgraphs/**"
jobs:
subgraph-check:
runs-on: ubuntu-latest
strategy:
matrix:
rover-version: ["latest"]
subgraph: ["products", "users", "inventory"]
env:
APOLLO_KEY: ${{ secrets.APOLLO_KEY }}
APOLLO_GRAPH_REF: supergraph-router@dev
name: ${{ matrix.subgraph }}
steps:
- uses: actions/checkout@v3
- name: install rover
env:
ROVER_VERSION: ${{ matrix.rover-version }}
run: |
curl -sSL https://rover.apollo.dev/nix/$ROVER_VERSION | sh
echo "PATH=$PATH:$HOME/.rover/bin" >> ${GITHUB_ENV}
- name: run schema check
if: env.APOLLO_KEY != 0
run: |
set -x
rover subgraph check $APOLLO_GRAPH_REF --schema subgraphs/${{ matrix.subgraph }}/${{ matrix.subgraph }}.graphql --name ${{ matrix.subgraph }}
- name: skip check
if: env.APOLLO_KEY == 0
run: echo skipping subgraph check due to public repo fork PR not having secrets access.