chore: add script for running tests in Docker container
This commit is contained in:
Executable
+15
@@ -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"
|
||||||
Reference in New Issue
Block a user