Skip to content

Bump @babel/core from 7.29.0 to 7.29.7 #115

Bump @babel/core from 7.29.0 to 7.29.7

Bump @babel/core from 7.29.0 to 7.29.7 #115

Workflow file for this run

name: CI/CD
on:
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22.x]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Lint checks
run: npm run format-check
- name: Unit test
run: npm run test:ci
- name: Install Cypress dependencies
run: |
cd cypress
npm install
- name: E2E tests
run: |
cd cypress
npm run test:e2e
- name: Check if cypress exists in main
id: check_cypress
run: |
git fetch origin main
HAS_CYPRESS=false
HAS_VITE=false
if git ls-tree -r origin/main --name-only | grep -q "^cypress/"; then
HAS_CYPRESS=true
echo "✅ Cypress folder exists in main branch"
else
echo "⚠️ Cypress folder does not exist in main branch - skipping baseline"
fi
if git ls-tree -r origin/main --name-only | grep -q "^vite.config"; then
HAS_VITE=true
echo "✅ Vite config exists in main branch"
else
echo "⚠️ Vite config does not exist in main branch - skipping baseline (react-scripts era)"
fi
if [ "$HAS_CYPRESS" = "true" ] && [ "$HAS_VITE" = "true" ]; then
echo "cypress_exists=true" >> $GITHUB_OUTPUT
else
echo "cypress_exists=false" >> $GITHUB_OUTPUT
fi
- name: Get main branch performance (baseline)
if: steps.check_cypress.outputs.cypress_exists == 'true'
run: |
# Save current branch
CURRENT_BRANCH=$(git branch --show-current)
echo "current_branch=$CURRENT_BRANCH" >> $GITHUB_ENV
# Checkout main and test
git checkout origin/main
npm ci
cd cypress
npm install
npm run test:performance || true
# Save main branch metrics as baseline
if [ -f performance-results/metrics.json ]; then
cp performance-results/metrics.json performance-results/baseline-metrics.json
echo "✅ Main branch baseline captured"
fi
# Return to PR branch
git checkout $CURRENT_BRANCH
- name: Get PR branch performance
run: |
cd cypress
npm run test:performance
- name: Compare performance (main vs PR)
if: steps.check_cypress.outputs.cypress_exists == 'true'
id: perf_compare
run: |
cd cypress
npm run compare:performance || echo "comparison_failed=true" >> $GITHUB_OUTPUT
continue-on-error: true
- name: Skip comparison message
if: steps.check_cypress.outputs.cypress_exists == 'false'
run: |
echo "⚠️ Skipping performance comparison - cypress folder not in main branch yet"
echo "This is expected for the first PR that adds performance testing"
echo "Future PRs will compare against this baseline"
- name: Upload performance report
uses: actions/upload-artifact@v4
if: always()
with:
name: performance-report
path: cypress/performance-results/comparison-report.md
if-no-files-found: ignore
- name: Display performance results in logs
if: steps.check_cypress.outputs.cypress_exists == 'true'
run: |
echo "=================================================="
echo "📊 PERFORMANCE COMPARISON REPORT"
echo "=================================================="
if [ -f cypress/performance-results/comparison-report.md ]; then
cat cypress/performance-results/comparison-report.md
else
echo "⚠️ No comparison report found"
fi
echo "=================================================="
- name: Upload Cypress screenshots on failure
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
if-no-files-found: ignore
- name: Upload Cypress videos
uses: actions/upload-artifact@v4
if: always()
with:
name: cypress-videos
path: cypress/videos
if-no-files-found: ignore
- name: Build demo
run: npm run demo:build