Skip to content

Commit

Permalink
Update github workflow files to update node version and add caching
Browse files Browse the repository at this point in the history
  • Loading branch information
Walodja1987 committed May 3, 2024
1 parent 5fe22e1 commit ef6803e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-subgraphs-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18

- name: Cache Modules
id: cache-modules
Expand Down
34 changes: 21 additions & 13 deletions .github/workflows/deploy-subgraphs-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ on:
pull_request:
paths:
- packages/*-subgraph/**/*

name: Deploy Staging subgraph

jobs:
pr:
runs-on: ubuntu-latest
Expand All @@ -12,27 +14,33 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.ref }}

- uses: actions/setup-node@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: '18'
cache: 'yarn'

- name: Cache Modules
id: cache-modules
- name: Cache Node Modules
uses: actions/cache@v2
with:
path: |
**/node_modules
node_modules
key: ${{ hashFiles('**/yarn.lock', '**/package.json', 'yarn.lock') }}
**/.yarn/cache
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock', '**/package.json', 'yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
if: steps.cache-modules.outputs.cache-hit != 'true'
run: yarn
- name: Authenticate the graph and deploy
env:
run: yarn install --frozen-lockfile

- name: Verify Node.js and Yarn Versions
run: |
node -v
yarn -v
- name: Authenticate with The Graph and Deploy
env:
THEGRAPH_ACCESS_TOKEN: ${{ secrets.THEGRAPH_ACCESS_TOKEN_TEST }}
run: |
yarn graph:auth
# yarn turbo run deploy-staging --scope="@diva/*-subgraph"


yarn turbo run deploy-staging --scope="@diva/*-subgraph"

0 comments on commit ef6803e

Please sign in to comment.