Skip to content

Commit 5ba6b61

Browse files
committed
feat: subgraph checks part of CI
1 parent 4386247 commit 5ba6b61

5 files changed

Lines changed: 15 additions & 0 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,12 @@ jobs:
4747
with:
4848
setup-go: "true"
4949
- run: make test-ci
50+
subgraphs-check:
51+
name: Checks subgraphs
52+
runs-on: ubuntu-latest
53+
env:
54+
COSMO_API_KEY: ${{ secrets.COSMO_API_KEY }}
55+
steps:
56+
- uses: actions/checkout@v6.0.2
57+
- uses: ./.github/actions/setup
58+
- run: make check-subgraphs

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ build-ci:
1515
compose:
1616
@pnpm compose
1717

18+
check-subgraphs:
19+
@pnpm subgraphs:check
20+
1821
# Build linux plugin binary + Docker image (run `make compose` first if config.json is missing)
1922
# for local development
2023
# Usage: make docker-local

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"build": "pnpm -r build",
99
"build:ci": "pnpm -r --workspace-concurrency=1 build:ci",
1010
"compose": "wgc router compose -i ./plugins/graph.yaml -o ./config.json",
11+
"subgraphs:check": "pnpm -r subgraph:check",
1112
"format": "pnpm -r format",
1213
"generate": "pnpm -r generate",
1314
"lint": "pnpm -r lint",

plugins/products/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"lint": "golangci-lint run ./...",
1313
"lint:ci": "golangci-lint run --allow-parallel-runners ./...",
1414
"publish:ci": "wgc router plugin publish --namespace default --label graph=demo --fail-on-composition-error .",
15+
"subgraph:check": "wgc subgraph check reviews --namespace default --label graph=demo --schema ./src/schema.graphql",
1516
"test": "wgc router plugin test .",
1617
"test:ci": "wgc router plugin test . --yes"
1718
},

plugins/reviews/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"lint": "golangci-lint run ./...",
1313
"lint:ci": "golangci-lint run --allow-parallel-runners ./...",
1414
"publish:ci": "wgc router plugin publish --namespace default --label graph=demo --fail-on-composition-error .",
15+
"subgraph:check": "wgc subgraph check reviews --namespace default --label graph=demo --schema ./src/schema.graphql",
1516
"test": "wgc router plugin test .",
1617
"test:ci": "wgc router plugin test . --yes"
1718
},

0 commit comments

Comments
 (0)