Skip to content

chore(deps): bump actions/setup-node from 4.4.0 to 7.0.0 #732

chore(deps): bump actions/setup-node from 4.4.0 to 7.0.0

chore(deps): bump actions/setup-node from 4.4.0 to 7.0.0 #732

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:
lint:
name: Lint & Type Check
runs-on: ubuntu-latest
defaults:
run:
working-directory: Dechat/dex_with_fiat_frontend
steps:
- name: Checkout repository
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: Install pnpm
uses: pnpm/action-setup@f40ffcd9367d9f12939873eb1018b921a783ffaa # v4
with:
version: 8
- name: Set up Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
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
build:
name: Build & Test
runs-on: ubuntu-latest
defaults:
run:
working-directory: Dechat/dex_with_fiat_frontend
steps:
- name: Checkout repository
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: Install pnpm
uses: pnpm/action-setup@f40ffcd9367d9f12939873eb1018b921a783ffaa # v4
with:
version: 8
- name: Set up Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: "24"
cache: "pnpm"
cache-dependency-path: Dechat/dex_with_fiat_frontend/pnpm-lock.yaml
- name: Install dependencies
run: pnpm install
- 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
# NOTE: coverage.thresholds are not currently configured in vitest.config.ts,
# so this step does not fail the pipeline on low coverage. The target numbers
# below (stmt 70%, branch 65%, fn 70%, lines 70%) are informational only until
# a threshold gate is deliberately reintroduced.
- name: Generate coverage report artifact
id: coverage_report
if: always() && github.event_name == 'pull_request'
run: |
if [ ! -f coverage/coverage-summary.json ]; then
echo "No coverage summary found, skipping report generation."
echo "generated=false" >> "$GITHUB_OUTPUT"
exit 0
fi
node -e "
const fs = require('fs');
const summary = JSON.parse(fs.readFileSync('coverage/coverage-summary.json', 'utf8'));
const total = summary.total;
const report = {
pr_number: ${{ github.event.pull_request.number }},
head_sha: '${{ github.event.pull_request.head.sha }}',
statements: total.statements.pct,
branches: total.branches.pct,
functions: total.functions.pct,
lines: total.lines.pct,
targets: { statements: 70, branches: 65, functions: 70, lines: 70 },
};
fs.writeFileSync('frontend-coverage-report.json', JSON.stringify(report));
"
echo "generated=true" >> "$GITHUB_OUTPUT"
# PRs from forks get a read-only GITHUB_TOKEN under the `pull_request` event, so
# this job can't post a comment directly. The report is handed off as an artifact
# to coverage-comment.yml, which runs via `workflow_run` in the base repo's
# context (write-capable token) and only ever reads this JSON — it never checks
# out or executes any code from the PR.
- name: Upload coverage report artifact
if: always() && steps.coverage_report.outputs.generated == 'true'
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: frontend-coverage-report
path: Dechat/dex_with_fiat_frontend/frontend-coverage-report.json
retention-days: 7
e2e:
name: Playwright E2E Tests
runs-on: ubuntu-latest
needs: [build, lint]
defaults:
run:
working-directory: Dechat/dex_with_fiat_frontend
steps:
- name: Checkout repository
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: Install pnpm
uses: pnpm/action-setup@f40ffcd9367d9f12939873eb1018b921a783ffaa # v4
with:
version: 8
- name: Set up Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: "24"
cache: "pnpm"
cache-dependency-path: Dechat/dex_with_fiat_frontend/pnpm-lock.yaml
- name: Install dependencies
run: pnpm install
- name: Cache Playwright browsers
id: playwright-cache
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: ~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ hashFiles('Dechat/dex_with_fiat_frontend/pnpm-lock.yaml') }}
- name: Install Playwright browsers
if: steps.playwright-cache.outputs.cache-hit != 'true'
run: pnpm exec playwright install --with-deps chromium firefox webkit
- name: Install Playwright OS dependencies
if: steps.playwright-cache.outputs.cache-hit == 'true'
run: pnpm exec playwright install-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@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: always()
with:
name: playwright-report
path: Dechat/dex_with_fiat_frontend/playwright-report/
retention-days: 7