Skip to content

Commit

Permalink
Add basic GH workflow for subgraph workspace
Browse files Browse the repository at this point in the history
This is an initial implementation of the CI process to check the formatting and building in `subgraph` workspace.
  • Loading branch information
kkosiorowska committed Mar 13, 2024
1 parent 9580a37 commit 970b216
Showing 1 changed file with 75 additions and 0 deletions.
75 changes: 75 additions & 0 deletions .github/workflows/subgraph.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Subgraph

on:
push:
branches:
- main
paths:
- "subgraph/**"
pull_request:

defaults:
run:
working-directory: ./subgraph

jobs:
subgraph-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up pnpm
uses: pnpm/action-setup@v3

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: "subgraph/.nvmrc"
cache: "pnpm"

- name: Install Dependencies
run: pnpm install --prefer-offline --frozen-lockfile

- name: Format
run: pnpm run format

subgraph-codegen:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up pnpm
uses: pnpm/action-setup@v3

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: "subgraph/.nvmrc"
cache: "pnpm"

- name: Install Dependencies
run: pnpm install --prefer-offline --frozen-lockfile

- name: Build
run: pnpm run codegen

subgraph-build:
needs: [subgraph-codegen]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up pnpm
uses: pnpm/action-setup@v3

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: "subgraph/.nvmrc"
cache: "pnpm"

- name: Install Dependencies
run: pnpm install --prefer-offline --frozen-lockfile

- name: Build
run: pnpm run build

0 comments on commit 970b216

Please sign in to comment.