Update Workflow #125
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
name: Benchmark | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- 'packages/sdk/**' | |
pull_request: | |
branches: [ main ] | |
paths: | |
- 'packages/sdk/**' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
name: Benchmark | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Cache pnpm modules | |
uses: actions/cache@v3 | |
with: | |
path: ~/.pnpm-store | |
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}- | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: latest | |
- name: Install Workspace Dependencies | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: pnpm install --filter "{packages/sdk}" --filter "{benchmarks}" | |
- name: Build SDK Package | |
run: cd ./packages/sdk && pnpm buildnodedev | |
- name: Run Benchmarks | |
env: | |
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }} | |
POLYGONSCAN_API_KEY: ${{ secrets.POLYGONSCAN_API_KEY }} | |
OPTIMISMSCAN_API_KEY: ${{ secrets.OPTIMISMSCAN_API_KEY }} | |
CNVSEC_ID: ${{ secrets.CNVSEC_ID }} | |
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }} | |
ZAPPER_API_KEY: ${{ secrets.ZAPPER_API_KEY }} | |
run: node ./benchmarks/benchmark.js |