Skip to content

chore(deps): bump the dependencies group with 3 updates (#85) #237

chore(deps): bump the dependencies group with 3 updates (#85)

chore(deps): bump the dependencies group with 3 updates (#85) #237

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
matrix:
node-version: [20.x, 24.x]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: Install dependencies
run: npm ci --legacy-peer-deps
- name: Lint
run: npm run lint
- name: Validate Actor Schemas
run: npm run validate:schemas
- name: Type Check
run: npm run typecheck
- name: Coverage Gate (Integration/E2E Scopes)
run: |
npm run test:coverage:new-scopes
npm run coverage:check:new-scopes
- name: Coverage Gate (Full Source Matrix)
run: |
npm run test:coverage:matrix
npm run coverage:check:matrix
verify-docker:
needs: build
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Build Apify Docker Image
run: docker build -t webhook-debugger-apify .
- name: Run Apify Container
run: |
docker run -d --name debugger-apify -p 8080:8080 \
-e ACTOR_WEB_SERVER_PORT=8080 \
webhook-debugger-apify
# Poll for startup (max 30 attempts, 1s apart)
for i in $(seq 1 30); do
# Check route /info (lightweight JSON endpoint)
if curl -s -o /dev/null -w '' http://localhost:8080/info 2>/dev/null; then
echo "Container ready after ${i}s"
exit 0
fi
sleep 1
done
echo "❌ Container failed to start within 30s"
exit 1
- name: Verify Apify SSE Headers (Anti-Regression)
run: |
# Check for 200 OK and NO compression
# Use timeout because SSE is an infinite stream
HEADERS=$(timeout 5s curl -s -D - -o /dev/null -H "Accept: text/event-stream" http://localhost:8080/log-stream || true)
if echo "$HEADERS" | grep -q "200 OK"; then
echo "✅ Status 200 OK"
else
echo "❌ Failed to connect"
exit 1
fi
if echo "$HEADERS" | grep -i "content-encoding:" | grep -v "identity"; then
echo "❌ Error: Content-Encoding detected (likely compression enabled)"
exit 1
else
echo "✅ No harmful Content-Encoding detected"
fi
- name: Stop Apify Container
if: always()
run: docker rm -f debugger-apify || true
- name: Build Standalone Docker Image
run: docker build --target runtime-standalone -t webhook-debugger-standalone .
- name: Run Standalone Container
run: |
docker run -d --name debugger-standalone -p 8081:8080 \
-e ACTOR_WEB_SERVER_PORT=8080 \
webhook-debugger-standalone
for i in $(seq 1 30); do
if curl -s -o /dev/null -w '' http://localhost:8081/info 2>/dev/null; then
echo "Standalone container ready after ${i}s"
exit 0
fi
sleep 1
done
echo "❌ Standalone container failed to start within 30s"
exit 1
- name: Verify Standalone Ready Probe
run: |
RESPONSE=$(curl -sS http://localhost:8081/ready)
if echo "$RESPONSE" | grep -q '"status":"ready"'; then
echo "✅ Standalone ready probe passed"
else
echo "❌ Standalone ready probe failed"
echo "$RESPONSE"
exit 1
fi
- name: Verify Standalone SSE Headers
run: |
HEADERS=$(timeout 5s curl -s -D - -o /dev/null -H "Accept: text/event-stream" http://localhost:8081/log-stream || true)
if echo "$HEADERS" | grep -q "200 OK"; then
echo "✅ Standalone SSE status 200 OK"
else
echo "❌ Standalone SSE failed to connect"
exit 1
fi
if echo "$HEADERS" | grep -i "content-encoding:" | grep -v "identity"; then
echo "❌ Error: Standalone image returned harmful Content-Encoding"
exit 1
else
echo "✅ Standalone image returned safe SSE headers"
fi
- name: Docker Logs (on failure)
if: failure()
run: |
docker logs debugger-apify || true
docker logs debugger-standalone || true
- name: Stop Standalone Container
if: always()
run: docker rm -f debugger-standalone || true