Skip to content

test(indexer): add end-to-end integration test suite for contract-indexer flow #71

test(indexer): add end-to-end integration test suite for contract-indexer flow

test(indexer): add end-to-end integration test suite for contract-indexer flow #71

Workflow file for this run

name: Backend Tests
on:
push:
branches: [main]
paths:
- 'Backend/**'
pull_request:
paths:
- 'Backend/**'
jobs:
test:
name: Run Backend Tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: Backend
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: Backend/package-lock.json
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Run unit tests with coverage
run: npm run test:cov
env:
NODE_ENV: test
- name: Run integration tests
run: npx jest --testRegex=".*\\.integration-spec\\.ts$" --testPathPattern="contract-indexer"
env:
NODE_ENV: test
- name: Upload coverage report
uses: actions/upload-artifact@v4
if: always()
with:
name: coverage-report
path: Backend/coverage/
retention-days: 14