-
Notifications
You must be signed in to change notification settings - Fork 20
36 lines (34 loc) · 1.11 KB
/
check-schema.yaml
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: Tests and Checks
on: push
jobs:
get_subgraph_name:
if: false
uses: ./.github/workflows/apollo.yaml
check_schema:
name: Check Schema with Apollo Studio
needs: [ get_subgraph_name ]
runs-on: ubuntu-latest
env:
APOLLO_KEY: ${{ secrets.APOLLO_KEY }}
APOLLO_GRAPH_REF: ${{ secrets.APOLLO_GRAPH_REF }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Install Rover
run: |
curl -sSL https://rover.apollo.dev/nix/latest | sh
echo "$HOME/.rover/bin" >> $GITHUB_PATH
- if: env.APOLLO_KEY != '' && env.APOLLO_GRAPH_REF != ''
run: rover subgraph check ${{ secrets.APOLLO_GRAPH_REF }} --schema schema.graphql --name ${{ needs.get_subgraph_name.outputs.name }}
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-node@v4
with:
node-version: 18
check-latest: true
- name: Setup project
run: npm install
- name: Test
run: npm run test