Skip to content

Test Staking

Test Staking #9

Workflow file for this run

name: Test Staking
on:
workflow_dispatch:
inputs:
network:
description: 'Cardano network'
required: true
default: 'mainnet'
type: choice
options:
- preprod
- mainnet
vault_account_id:
description: 'Vault account ID'
required: true
default: '1'
staking_action:
description: 'Staking action'
required: true
default: 'info'
type: choice
options:
- info
- register
- delegate
- withdraw
pool_id:
description: 'Pool ID (required for delegate action)'
required: false
default: ''
jobs:
test-staking:
runs-on: ubuntu-latest
environment: tests
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm install
- name: Lint
run: npm run lint
- name: Type check
run: npm run typecheck
- name: Cache build
uses: actions/cache@v4
id: build-cache
with:
path: dist/
key: build-${{ hashFiles('src/**/*.ts', 'tsconfig.json') }}
- name: Build
if: steps.build-cache.outputs.cache-hit != 'true'
run: npm run build
- name: Run staking test
env:
FIREBLOCKS_API_USER_KEY: ${{ secrets.FIREBLOCKS_API_KEY }}
FIREBLOCKS_API_USER_SECRET_KEY: ${{ secrets.FIREBLOCKS_API_SECRET }}
IAGON_API_KEY: ${{ secrets.IAGON_API_KEY }}
CARDANO_NETWORK: ${{ inputs.network }}
VAULT_ACCOUNT_ID: ${{ inputs.vault_account_id }}
STAKING_ACTION: ${{ inputs.staking_action }}
POOL_ID: ${{ inputs.pool_id }}
FIREBLOCKS_BASE_PATH: ${{ secrets.FIREBLOCKS_BASE_PATH }}
run: npx tsx scripts/test-staking.ts