Skip to content

feat(frontend): add print stylesheet for ReceiptDrawer.tsx transaction receipts #588

feat(frontend): add print stylesheet for ReceiptDrawer.tsx transaction receipts

feat(frontend): add print stylesheet for ReceiptDrawer.tsx transaction receipts #588

Workflow file for this run

name: Frontend CI
on:
pull_request:
branches: [main]
paths:
- "Dechat/dex_with_fiat_frontend/**"
- ".github/workflows/frontend.yml"
push:
branches: [main]
paths:
- "Dechat/dex_with_fiat_frontend/**"
permissions:
contents: read
jobs:
build:
name: Build & Type Check
runs-on: ubuntu-latest
defaults:
run:
working-directory: Dechat/dex_with_fiat_frontend
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "24"
cache: "pnpm"
cache-dependency-path: Dechat/dex_with_fiat_frontend/pnpm-lock.yaml
- name: Install dependencies
run: pnpm install
- name: Type check
run: pnpm tsc --noEmit
- name: Lint
run: pnpm lint
- name: Build
run: pnpm build
env:
NEXT_PUBLIC_STELLAR_CONTRACT_ID: ${{ secrets.NEXT_PUBLIC_STELLAR_CONTRACT_ID || 'PLACEHOLDER' }}
NEXT_PUBLIC_XLM_SAC_ID: ${{ secrets.NEXT_PUBLIC_XLM_SAC_ID || 'PLACEHOLDER' }}
NEXT_PUBLIC_STELLAR_RPC_URL: ${{ secrets.NEXT_PUBLIC_STELLAR_RPC_URL || 'https://soroban-testnet.stellar.org' }}
NEXT_PUBLIC_STELLAR_NETWORK: ${{ secrets.NEXT_PUBLIC_STELLAR_NETWORK || 'TESTNET' }}
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY || 'PLACEHOLDER' }}
PAYSTACK_SECRET_KEY: ${{ secrets.PAYSTACK_SECRET_KEY || 'PLACEHOLDER' }}
PAYOUT_PROVIDER: ${{ secrets.PAYOUT_PROVIDER || 'paystack' }}
- name: Unit tests with coverage (shard 1/4)
run: pnpm test:coverage:shard:1
env:
NODE_OPTIONS: --max-old-space-size=8192
- name: Unit tests with coverage (shard 2/4)
run: pnpm test:coverage:shard:2
env:
NODE_OPTIONS: --max-old-space-size=8192
- name: Unit tests with coverage (shard 3/4)
run: pnpm test:coverage:shard:3
env:
NODE_OPTIONS: --max-old-space-size=8192
- name: Unit tests with coverage (shard 4/4)
run: pnpm test:coverage:shard:4
env:
NODE_OPTIONS: --max-old-space-size=8192
- name: Merge coverage reports
run: pnpm test:coverage:merge
env:
NODE_OPTIONS: --max-old-space-size=4096
# Fails the pipeline if coverage thresholds (stmt 70%, branch 65%, fn 70%) are not met
e2e:
name: Playwright E2E Tests
runs-on: ubuntu-latest
needs: build
defaults:
run:
working-directory: Dechat/dex_with_fiat_frontend
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "24"
cache: "pnpm"
cache-dependency-path: Dechat/dex_with_fiat_frontend/pnpm-lock.yaml
- name: Install dependencies
run: pnpm install
- name: Install Playwright browsers
run: pnpm exec playwright install --with-deps chromium firefox webkit
- name: Build for E2E
run: pnpm build
env:
NEXT_PUBLIC_STELLAR_CONTRACT_ID: ${{ secrets.NEXT_PUBLIC_STELLAR_CONTRACT_ID || 'PLACEHOLDER' }}
NEXT_PUBLIC_XLM_SAC_ID: ${{ secrets.NEXT_PUBLIC_XLM_SAC_ID || 'PLACEHOLDER' }}
NEXT_PUBLIC_STELLAR_RPC_URL: ${{ secrets.NEXT_PUBLIC_STELLAR_RPC_URL || 'https://soroban-testnet.stellar.org' }}
NEXT_PUBLIC_STELLAR_NETWORK: ${{ secrets.NEXT_PUBLIC_STELLAR_NETWORK || 'TESTNET' }}
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY || 'PLACEHOLDER' }}
PAYSTACK_SECRET_KEY: ${{ secrets.PAYSTACK_SECRET_KEY || 'PLACEHOLDER' }}
PAYOUT_PROVIDER: ${{ secrets.PAYOUT_PROVIDER || 'paystack' }}
- name: Run Playwright E2E tests
run: pnpm test:e2e
env:
NEXT_PUBLIC_STELLAR_CONTRACT_ID: ${{ secrets.NEXT_PUBLIC_STELLAR_CONTRACT_ID || 'PLACEHOLDER' }}
NEXT_PUBLIC_XLM_SAC_ID: ${{ secrets.NEXT_PUBLIC_XLM_SAC_ID || 'PLACEHOLDER' }}
NEXT_PUBLIC_STELLAR_RPC_URL: ${{ secrets.NEXT_PUBLIC_STELLAR_RPC_URL || 'https://soroban-testnet.stellar.org' }}
NEXT_PUBLIC_STELLAR_NETWORK: ${{ secrets.NEXT_PUBLIC_STELLAR_NETWORK || 'TESTNET' }}
- name: Upload Playwright report
uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: Dechat/dex_with_fiat_frontend/playwright-report/
retention-days: 7