-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add basic GH workflow for subgraph workspace
This is an initial implementation of the CI process to check the formatting and building in `subgraph` workspace.
- Loading branch information
1 parent
9580a37
commit 970b216
Showing
1 changed file
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |