Skip to content

Feat/stableswap ng

Feat/stableswap ng #15

Workflow file for this run

# GitHub Actions workflow for testing your Envio indexer
#
# This workflow runs your indexer tests on every push to main and on pull requests.
# It ensures your indexer code compiles correctly and all tests pass before merging.
#
# Prerequisites:
# - Your project uses pnpm as the package manager
# - Vitest is installed (included by default in envio projects)
# - You have a "test" script defined in package.json (e.g., "test": "vitest run")
#
# Required: ENVIO_API_TOKEN
# Envio indexers use HyperSync as the default data source, which requires an API token.
# Add ENVIO_API_TOKEN to your repository secrets before running this workflow.
# To add the secret: Repository Settings > Secrets and variables > Actions > New repository secret
# Get your token at: https://envio.dev
name: Test
on:
# Run tests when code is pushed to main branch
push:
branches:
- main
# Run tests on all pull requests
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
# Check out your repository code
- name: Checkout code
uses: actions/checkout@v4
# Set up pnpm package manager
# Update the version below if you need a different pnpm version
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10
# Set up Node.js with caching for faster installs
# The cache: 'pnpm' option caches dependencies between runs
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24
cache: 'pnpm'
# Install project dependencies
- name: Install dependencies
run: pnpm install
# Generate indexer types
# This step is required before running tests
- name: Run codegen
run: pnpm codegen
env:
ENVIO_API_TOKEN: ${{ secrets.ENVIO_API_TOKEN }}
# Run your indexer tests using Vitest
- name: Run tests
run: pnpm test
env:
ENVIO_API_TOKEN: ${{ secrets.ENVIO_API_TOKEN }}