feat: new GH action for the subgraph (#120)

* feat: add subgraph unit tests to github action.

* feat: add yarn codegen to the github action.

* feat: create a subgraph action, remove unit testing subgraphs from test action.

* fix: add the location of the contracts.

* chore: remove empty tabs from GH workflow files.

* chore: add path to the subgraph github action and also add build command.

* fix: include a yarn compile step in the subgraph github action.
This commit is contained in:
Shredder 2023-02-10 22:42:58 +03:30 committed by GitHub
parent 7f1aca15dd
commit 2adb39641b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 46 additions and 1 deletions

45
.github/workflows/subgraph.yml vendored Normal file
View File

@ -0,0 +1,45 @@
name: Subgraph
on:
pull_request:
branches:
- main
- develop
push:
paths:
- 'subgraph/**'
jobs:
test-subgraph:
runs-on: ubuntu-latest
defaults:
run:
working-directory: subgraph
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Compile contracts to get access to the ABI
run: cd ../contracts && yarn && yarn compile && cd ../subgraph
- name: Install dependencies
run: yarn --ignore-scripts
- name: Run codegen
run: yarn codegen
- name: Build Subgraph
run: yarn build
- name: Test Subgraph
run: yarn test

View File

@ -68,4 +68,4 @@ jobs:
run: yarn audit --groups dependencies
- name: Build
run: yarn build
run: yarn build