From 9c884ee0205aeda112c3fec7f77682d41e8e4d46 Mon Sep 17 00:00:00 2001 From: David Gwilliam Date: Tue, 31 Mar 2026 21:58:49 -0700 Subject: [PATCH] chore: add script for running tests in Docker container --- scripts/run-tests-in-container.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 scripts/run-tests-in-container.sh diff --git a/scripts/run-tests-in-container.sh b/scripts/run-tests-in-container.sh new file mode 100755 index 0000000..b3f5a1f --- /dev/null +++ b/scripts/run-tests-in-container.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# Run tests in a Node.js container (for consistent environment) + +set -e + +echo "Running tests in node:20-alpine container..." +echo "This avoids Node.js setup time and ensures consistent environment." +echo "" + +# Run unit tests in container +docker run --rm \ + -v "$(pwd):/app" \ + -w /app \ + node:20-alpine \ + sh -c "apk add --no-cache bash git && npm ci && npm run test:run"