Skip to content

Commit f67900c

Browse files
ci: add gh workflow to validate subgraph (#288)
closes #178
1 parent 4b4e7c6 commit f67900c

File tree

2 files changed

+3365
-0
lines changed

2 files changed

+3365
-0
lines changed

.github/workflows/subgraph.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Subgraph Build Check
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
8+
jobs:
9+
build:
10+
name: Build Subgraph
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
submodules: recursive
17+
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: "20"
22+
23+
- name: Install pnpm
24+
uses: pnpm/action-setup@v2
25+
with:
26+
version: 9
27+
28+
- name: Install dependencies
29+
run: |
30+
cd subgraph
31+
pnpm install --frozen-lockfile
32+
33+
- name: Generate subgraph precodegen
34+
run: |
35+
cd subgraph
36+
pnpm run precodegen
37+
38+
- name: Generate subgraph codegen
39+
run: |
40+
cd subgraph
41+
pnpm run codegen
42+
43+
- name: Build subgraph
44+
run: |
45+
cd subgraph
46+
pnpm run build
47+
48+
- name: Verify build artifacts
49+
run: |
50+
cd subgraph
51+
if [ ! -d "build" ]; then
52+
echo "Error: Build directory not created!"
53+
exit 1
54+
fi
55+
echo "✓ Subgraph built successfully"

0 commit comments

Comments
 (0)