-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Misc Upgrades with ebip 17 and master (#961)
- Loading branch information
Showing
498 changed files
with
261,582 additions
and
186,860 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,78 @@ | ||
name: Subgraph Basin | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize] | ||
paths: | ||
- "projects/subgraph-basin/**" | ||
- "projects/subgraph-core/**" | ||
|
||
jobs: | ||
compile: | ||
runs-on: ubuntu-latest | ||
name: Compile | ||
steps: | ||
- name: Check out source repository | ||
uses: actions/checkout@v3 | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "20" | ||
- name: Cache Node Modules | ||
id: node-modules-cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: "**/node_modules" | ||
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | ||
- name: Install The Graph CLI | ||
run: npm install -g @graphprotocol/graph-cli | ||
- name: Install Dependencies | ||
if: steps.node-modules-cache.outputs.cache-hit != 'true' | ||
run: yarn install --immutable | ||
working-directory: projects/subgraph-basin | ||
|
||
# Generate code and check for uncommitted changes | ||
# https://github.com/marketplace/actions/check-uncommitted-changes | ||
- name: Generate Subgraph Code | ||
run: yarn codegen | ||
working-directory: projects/subgraph-basin | ||
- name: Check for uncommitted changes | ||
id: check-changes | ||
uses: mskri/[email protected] | ||
- name: Evaluate if there are changes | ||
if: steps.check-changes.outputs.outcome == failure() | ||
run: echo "There are uncommitted changes - execute 'yarn codegen' locally and commit the generated files!" | ||
|
||
- name: Build Subgraph | ||
run: yarn build | ||
working-directory: projects/subgraph-basin | ||
test: | ||
runs-on: ubuntu-latest | ||
name: Test | ||
steps: | ||
- name: Check out source repository | ||
uses: actions/checkout@v3 | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "20" | ||
- name: Cache Node Modules | ||
id: node-modules-cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: "**/node_modules" | ||
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | ||
- name: Install The Graph CLI | ||
run: npm install -g @graphprotocol/graph-cli | ||
- name: Install Dependencies | ||
if: steps.node-modules-cache.outputs.cache-hit != 'true' | ||
run: yarn install --immutable | ||
working-directory: projects/subgraph-basin | ||
|
||
- name: Generate Subgraph Code | ||
run: yarn codegen | ||
working-directory: projects/subgraph-basin | ||
|
||
- name: Run Tests | ||
run: yarn test | ||
working-directory: projects/subgraph-basin |
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
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,78 @@ | ||
name: Subgraph BeaNFT | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize] | ||
paths: | ||
- "projects/subgraph-beanft/**" | ||
- "projects/subgraph-core/**" | ||
|
||
jobs: | ||
compile: | ||
runs-on: ubuntu-latest | ||
name: Compile | ||
steps: | ||
- name: Check out source repository | ||
uses: actions/checkout@v3 | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "20" | ||
- name: Cache Node Modules | ||
id: node-modules-cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: "**/node_modules" | ||
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | ||
- name: Install The Graph CLI | ||
run: npm install -g @graphprotocol/graph-cli | ||
- name: Install Dependencies | ||
if: steps.node-modules-cache.outputs.cache-hit != 'true' | ||
run: yarn install --immutable | ||
working-directory: projects/subgraph-beanft | ||
|
||
# Generate code and check for uncommitted changes | ||
# https://github.com/marketplace/actions/check-uncommitted-changes | ||
- name: Generate Subgraph Code | ||
run: yarn codegen | ||
working-directory: projects/subgraph-beanft | ||
- name: Check for uncommitted changes | ||
id: check-changes | ||
uses: mskri/[email protected] | ||
- name: Evaluate if there are changes | ||
if: steps.check-changes.outputs.outcome == failure() | ||
run: echo "There are uncommitted changes - execute 'yarn codegen' locally and commit the generated files!" | ||
|
||
- name: Build Subgraph | ||
run: yarn build | ||
working-directory: projects/subgraph-beanft | ||
test: | ||
runs-on: ubuntu-latest | ||
name: Test | ||
steps: | ||
- name: Check out source repository | ||
uses: actions/checkout@v3 | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "20" | ||
- name: Cache Node Modules | ||
id: node-modules-cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: "**/node_modules" | ||
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | ||
- name: Install The Graph CLI | ||
run: npm install -g @graphprotocol/graph-cli | ||
- name: Install Dependencies | ||
if: steps.node-modules-cache.outputs.cache-hit != 'true' | ||
run: yarn install --immutable | ||
working-directory: projects/subgraph-beanft | ||
|
||
- name: Generate Subgraph Code | ||
run: yarn codegen | ||
working-directory: projects/subgraph-beanft | ||
|
||
- name: Run Tests | ||
run: yarn test | ||
working-directory: projects/subgraph-beanft |
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
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,48 @@ | ||
name: Deploy Subgraph | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
environment: | ||
description: "Deployment environment (prod/dev/testing)" | ||
required: true | ||
subgraph: | ||
description: "Subgraph name (beanstalk/bean/basin/beanft)" | ||
required: true | ||
branch: | ||
description: "Branch name" | ||
required: true | ||
|
||
jobs: | ||
validation: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
environment: ${{ steps.check_env.outputs.environment }} | ||
steps: | ||
- name: Validate environment input | ||
id: check_env | ||
run: | | ||
# Check if the environment is prod/dev/testing/prev | ||
if [[ "${{ github.event.inputs.environment }}" != "prod" && "${{ github.event.inputs.environment }}" != "dev" && "${{ github.event.inputs.environment }}" != "testing" && "${{ github.event.inputs.environment }}" != "prev" ]]; then | ||
echo "Error: Environment must be one of 'prod', 'dev', 'testing'." | ||
exit 1 | ||
fi | ||
# Check if the subgraph is a valid selection | ||
if [[ "${{ github.event.inputs.subgraph }}" != "beanstalk" && "${{ github.event.inputs.subgraph }}" != "bean" && "${{ github.event.inputs.subgraph }}" != "basin" && "${{ github.event.inputs.subgraph }}" != "beanft" ]]; then | ||
echo "Error: Subgraph must be one of 'beanstalk', 'bean', 'basin', 'beanft'." | ||
exit 1 | ||
fi | ||
deploy: | ||
needs: validation | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install SSH key | ||
run: | | ||
mkdir -p ~/.ssh | ||
echo "${{ secrets.GRAPH_SERVER_SSH_KEY }}" > ~/.ssh/id_ed25519 | ||
chmod 600 ~/.ssh/id_ed25519 | ||
ssh-keyscan -H ${{ secrets.GRAPH_SERVER_HOST }} >> ~/.ssh/known_hosts | ||
- name: Execute Remote Deployment Script | ||
run: ssh -i ~/.ssh/id_ed25519 github@${{ secrets.GRAPH_SERVER_HOST }} "bash /home/github/deploy.sh ${{ github.event.inputs.branch }} ${{ github.event.inputs.subgraph }} ${{ github.event.inputs.environment }}" |
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
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
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
Oops, something went wrong.