Skip to content

chore(deps): bump react-router-dom from 6.27.0 to 7.18.2 in /frontend #49

chore(deps): bump react-router-dom from 6.27.0 to 7.18.2 in /frontend

chore(deps): bump react-router-dom from 6.27.0 to 7.18.2 in /frontend #49

Workflow file for this run

name: Performance Budget & Coverage
on:
pull_request:
branches: [main]
paths:
- 'frontend/**'
push:
branches: [main]
paths:
- 'frontend/**'
jobs:
# ── Unit Tests with Coverage Enforcement (Issue #370) ──────────────────────
frontend-coverage:
name: Frontend Unit Tests & Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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: Run tests with coverage
run: npm run test:coverage:ci
working-directory: frontend
env:
VITE_CONTRACT_ID: PLACEHOLDER
VITE_RPC_URL: https://soroban-testnet.stellar.org:443
VITE_NETWORK_PASSPHRASE: "Test SDF Network ; September 2015"
VITE_API_URL: http://localhost:3001
- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: frontend/coverage/
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results
path: frontend/test-results.xml
# ── Performance Budget Enforcement (Issue #367 / #368) ─────────────────────
frontend-perf-budget:
name: Frontend Performance Budget
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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
# Build with strict performance budget enforcement.
# VITE_PERF_BUDGET_FAIL=true causes the build to exit non-zero
# when any chunk exceeds its defined size limit (vite.config.js).
- name: Build with performance budget enforcement
run: npm run build:ci
working-directory: frontend
env:
VITE_CONTRACT_ID: PLACEHOLDER
VITE_RPC_URL: https://soroban-testnet.stellar.org:443
VITE_NETWORK_PASSPHRASE: "Test SDF Network ; September 2015"
VITE_API_URL: http://localhost:3001
VITE_PERF_BUDGET_FAIL: 'true'
# Upload the bundle analysis report for review in every PR
- name: Upload bundle analysis
uses: actions/upload-artifact@v4
with:
name: bundle-analysis
path: frontend/dist/stats.html
# Report bundle sizes as a PR comment so reviewers can spot regressions
- name: Report bundle sizes
if: github.event_name == 'pull_request'
run: |
echo "## 📦 Bundle Analysis" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "See the attached \`bundle-analysis\` artifact for an interactive treemap." >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "### Chunk Sizes" >> $GITHUB_STEP_SUMMARY
cd frontend/dist/assets && ls -lh *.js *.css 2>/dev/null | \
awk '{printf "| %-50s | %s |\n", $NF, $5}' | \
(echo "| File | Size |"; echo "|------|------|"; cat) >> $GITHUB_STEP_SUMMARY || true
# ── Synthetic Lighthouse CI (Issue #369 / #368) ─────────────────────────────
lighthouse:
name: Lighthouse CI
runs-on: ubuntu-latest
needs: [frontend-perf-budget]
steps:
- uses: actions/checkout@v4
- 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: Build for Lighthouse
run: npm run build
working-directory: frontend
env:
VITE_CONTRACT_ID: PLACEHOLDER
VITE_RPC_URL: https://soroban-testnet.stellar.org:443
VITE_NETWORK_PASSPHRASE: "Test SDF Network ; September 2015"
VITE_API_URL: http://localhost:3001
- name: Install Lighthouse CI
run: npm install -g @lhci/cli@0.14.x
- name: Run Lighthouse CI
run: lhci autorun
working-directory: frontend
env:
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
- name: Upload Lighthouse results
uses: actions/upload-artifact@v4
if: always()
with:
name: lighthouse-results
path: frontend/.lighthouseci/