Skip to content

Merge pull request #345 from rayeberechi/feature/314-merchant-account… #270

Merge pull request #345 from rayeberechi/feature/314-merchant-account…

Merge pull request #345 from rayeberechi/feature/314-merchant-account… #270

Workflow file for this run

name: Backend CI
on:
push:
branches: ["main"]
paths:
- "fluxapay_backend/**"
pull_request:
branches: ["main"]
paths:
- "fluxapay_backend/**"
jobs:
build-and-check:
name: Backend Build Check
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15-alpine
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: fluxapay_test
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 5s
--health-timeout 5s
--health-retries 5
defaults:
run:
working-directory: ./fluxapay_backend
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install dependencies
run: npm install
- name: Generate Prisma Client
run: npx prisma generate
- name: Sync database schema
run: npx prisma db push
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/fluxapay_test?schema=public
- name: Format Check (Lint)
run: npm run lint
- name: Run Tests
run: npm test
env:
KMS_PROVIDER: local
KMS_ENCRYPTION_PASSPHRASE: ci-test-passphrase-for-hd-wallet-secure
HD_WALLET_MASTER_SEED: ci-test-master-seed-32chars-long-padded!!
DISABLE_CRON: "true"
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/fluxapay_test?schema=public
JWT_SECRET: ci-test-jwt-secret-key
- name: Build Check
run: npm run build
# Verification that the backend TypeScript application builds successfully.