Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ jobs:
steps:
- uses: actions/checkout@v6

- name: No stress-test figures committed
run: |
figs=$(git ls-files -- 'test/stress' | grep -Ei '\.(png|jpe?g|gif|svg|pdf|webp|bmp|tiff?)$' || true)
if [ -n "$figs" ]; then
echo "::error::Figure/image files are committed under test/stress (keep them local):"
echo "$figs"
exit 1
fi

- uses: actions/setup-node@v6
with:
node-version: 20
Expand Down
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,15 @@ test/fixtures/large_250k.vcf
# Environment
.env
.env.local

# Stress-test figures and generated data — keep local, never upload.
# Enforced by scripts/pre-commit and scripts/pre-push.
test/stress/figures/
test/stress/results/
test/stress/**/*.png
test/stress/**/*.jpg
test/stress/**/*.jpeg
test/stress/**/*.gif
test/stress/**/*.svg
test/stress/**/*.pdf
test/stress/**/*.webp
18 changes: 18 additions & 0 deletions scripts/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh
# Pre-commit hook: keep stress-test figures local.
# Refuses to commit image files under test/stress/ (they are also git-ignored).
#
# Install: git config core.hooksPath scripts (done by npm postinstall)

staged=$(git diff --cached --name-only --diff-filter=ACM \
| grep -Ei '^test/stress/.*\.(png|jpe?g|gif|svg|pdf|webp|bmp|tiff?)$' || true)

if [ -n "$staged" ]; then
echo "ERROR: refusing to commit figure/image files under test/stress (must stay local):" >&2
printf ' - %s\n' $staged >&2
echo "They are git-ignored. Unstage with: git restore --staged <file>" >&2
echo "(Do not use 'git add -f' on these — keep figures local.)" >&2
exit 1
fi

exit 0
9 changes: 9 additions & 0 deletions scripts/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@

set -e

echo "=== Pre-push: No stress-test figures uploaded ==="
tracked_figs=$(git ls-files -- 'test/stress' | grep -Ei '\.(png|jpe?g|gif|svg|pdf|webp|bmp|tiff?)$' || true)
if [ -n "$tracked_figs" ]; then
echo "ERROR: image files are tracked under test/stress and must stay local:" >&2
printf ' - %s\n' $tracked_figs >&2
echo "Run 'git rm --cached <file>' to untrack them (they are git-ignored)." >&2
exit 1
fi

echo "=== Pre-push: Type-check extension and server ==="
npx tsc --noEmit

Expand Down
Binary file removed test/stress/stress_test_results.png
Binary file not shown.