Skip to content

[FEAT] Backend: Implement Soroban Event Indexer #200 #49

[FEAT] Backend: Implement Soroban Event Indexer #200

[FEAT] Backend: Implement Soroban Event Indexer #200 #49

Workflow file for this run

# Continuous Integration workflow for FlowFi
# Covers frontend linting/build, backend build/test, and Soroban contract build/test.
name: CI
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
jobs:
frontend:
name: Frontend CI
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Install dependencies
run: npm ci
working-directory: frontend
- name: Lint
run: npm run lint
working-directory: frontend
- name: Build
run: npm run build
working-directory: frontend
backend:
name: Backend CI
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15
env:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: flowfi_test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup 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
working-directory: backend
- name: Generate Prisma Client
run: npx prisma generate
working-directory: backend
- name: Build
run: npm run build
working-directory: backend
- name: Run Backend Tests
run: npm test
working-directory: backend
env:
DATABASE_URL: postgresql://user:password@localhost:5432/flowfi_test
contracts:
name: Soroban Contracts CI
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: wasm32-unknown-unknown
- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
workspaces: "contracts -> target"
- name: Build Contracts
run: cargo build --target wasm32-unknown-unknown --release
working-directory: contracts
- name: Run Contract Tests
run: cargo test
working-directory: contracts