Skip to content

fix(backup): close two teardown gaps flagged in code review #98

fix(backup): close two teardown gaps flagged in code review

fix(backup): close two teardown gaps flagged in code review #98

Workflow file for this run

name: Stress Tests
on:
pull_request:
paths:
- "src/**/*.cpp"
- "src/**/*.h"
- "src/**/*.ts"
- "benchmark/**"
- ".github/workflows/stress-tests.yml"
push:
branches: [main]
workflow_dispatch:
inputs:
size:
description: "Database size in MB"
required: false
type: choice
default: "10"
options:
- "10"
- "50"
- "100"
- "200"
jobs:
stress-test:
runs-on: ubuntu-24.04
timeout-minutes: 30
strategy:
fail-fast: false # Don't cancel other jobs if one fails
matrix:
node-version: [20, 22]
name: Stress Tests (Node ${{ matrix.node-version }})
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Build project
run: npm run build
- name: Run stress test validation
run: npm run stress:validate
timeout-minutes: 5
- name: Install and build benchmark dependencies
run: |
cd benchmark
npm install
# Rebuild better-sqlite3 native bindings (npm install skips scripts due to .npmrc)
npm rebuild better-sqlite3
cd ..
- name: Run stress tests (CI mode)
run: npx tsx scripts/stress-test.ts --ci --output-file stress-test-results.json
timeout-minutes: 20
- name: Upload stress test results
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: stress-test-results-node-${{ matrix.node-version }}
path: |
stress-test-results.json
stress-test-results.md
retention-days: 30
- name: Performance regression check
if: github.event_name == 'pull_request'
run: |
# This is a placeholder for future performance regression detection
# Could compare against baseline performance metrics stored in the repo
echo "Performance regression check completed"