Skip to content

Commit

Permalink
Merge pull request #3 from superfluid-finance/goldsky
Browse files Browse the repository at this point in the history
wip: goldsky
  • Loading branch information
kasparkallas authored Mar 18, 2024
2 parents 4962ebf + 595f2a2 commit 8244f88
Show file tree
Hide file tree
Showing 9 changed files with 253 additions and 53 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/vs-subgraph-ci-goldsky.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Deploy VestingScheduler Subgraphs (Goldsky)

on:
workflow_dispatch:
push:
branches:
- "release-v1/*"
- "goldsky"
paths:
- "subgraphs/vesting-scheduler/**"

jobs:
deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: subgraphs/vesting-scheduler
strategy:
matrix:
networks:
[
"avalanche-c",
"arbitrum-one",
"bsc-mainnet",
"eth-mainnet",
"eth-goerli",
"xdai-mainnet",
"optimism-mainnet",
"polygon-mainnet",
"polygon-mumbai",
]
steps:
- uses: actions/checkout@v2
- name: Install node
uses: actions/setup-node@v1
with:
node-version: 18
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Install
run: pnpm install
- name: Generate YAML & Types
run: pnpm gen
- name: Build
run: pnpm exec graph build ${{format('./{0}.subgraph.yaml', matrix.networks)}}
- name: Test
run: pnpm test
- name: Goldsky Auth
run: pnpm exec goldsky login --token ${{secrets.GOLDSKY_API_KEY}}
- name: Get Version
id: get-version
uses: actions/github-script@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const fs = require('fs');
const packageJson = JSON.parse(fs.readFileSync('package.json'));
return packageJson.version;
- name: Goldsky Deploy
run: pnpm exec goldsky subgraph deploy ${{format('vesting-v1-{0}/{1}', matrix.networks, steps.get-version.outputs.result) }} --path ./build
- name: Goldsky Tag
run: pnpm exec goldsky subgraph tag ${{format('vesting-v1-{0}/{1}', matrix.networks, steps.get-version.outputs.result) }} --tag latest
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,8 @@
"gen": "pnpm -r gen",
"build": "pnpm -r build",
"test": "pnpm -r test"
},
"devDependencies": {
"@goldskycom/cli": "^8.5.1"
}
}
35 changes: 35 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions subgraphs/flow-scheduler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@
"license": "MIT",
"author": "Superfluid",
"scripts": {
"build": "graph build ./eth-mainnet.subgraph.yaml",
"deploy:test": "graph deploy --product hosted-service tokdaniel/scheduling-v1-mumbai-test polygon-mumbai.subgraph.yaml",
"build": "graph build ./polygon-mumbai.subgraph.yaml",
"deploy:test": "goldsky subgraph deploy scheduling-v1-mumbai-test/1.1.0 --path ./build",
"dev": "nodemon -e ts -x yarn test",
"gen": "npm-run-all -s gen:yaml gen:types",
"gen:types": "graph codegen ./eth-mainnet.subgraph.yaml --output-dir src/types/",
"gen:yaml": "ts-node ./scripts/generate-yamls.ts",
"test": "graph test"
},
"devDependencies": {
"@goldskycom/cli": "^8.5.1",
"@graphprotocol/graph-cli": "^0.56.0",
"@graphprotocol/graph-ts": "^0.29.3",
"@types/node": "^20.5.4",
Expand All @@ -27,7 +28,7 @@
"nodemon": "^3.0.1",
"npm-run-all": "^4.1.5",
"prettier": "^3.0.2",
"ts-node": "^10.9.1",
"typescript": "^5.1.6"
"ts-node": "^10.9.2",
"typescript": "^5.4.2"
}
}
62 changes: 47 additions & 15 deletions subgraphs/flow-scheduler/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions subgraphs/vesting-scheduler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"test": "graph test"
},
"devDependencies": {
"@goldskycom/cli": "^8.5.1",
"@graphprotocol/graph-cli": "^0.56.0",
"@graphprotocol/graph-ts": "^0.29.3",
"@types/node": "^20.5.4",
Expand All @@ -27,7 +28,7 @@
"nodemon": "^3.0.1",
"npm-run-all": "^4.1.5",
"prettier": "^3.0.2",
"ts-node": "^10.9.1",
"typescript": "^5.1.6"
"ts-node": "^10.9.2",
"typescript": "^5.4.2"
}
}
Loading

0 comments on commit 8244f88

Please sign in to comment.