Files
Renovate/scripts/test-renovate.sh
kovagoadi 4853c7d5ca
All checks were successful
Test Renovate Config / test-renovate (push) Successful in 50s
Test Renovate Config / test-renovate (pull_request) Successful in 52s
Added assertions
2025-11-22 14:11:51 +01:00

39 lines
982 B
Bash
Executable File

#!/bin/bash
set -e
echo "Validating Renovate configuration..."
renovate-config-validator
echo "Running Renovate dry-run..."
renovate --dry-run=full > renovate-output.log 2>&1
cat renovate-output.log
# Assertions
echo "Checking for successful run..."
if ! grep -q "Repository finished" renovate-output.log; then
echo "Error: Renovate run did not finish successfully."
exit 1
fi
echo "Checking for errors..."
if grep -q "ERROR" renovate-output.log; then
echo "Error: Renovate log contains errors."
exit 1
fi
# Specific assertions based on the test repo state
echo "Checking for expected nginx update..."
if ! grep -q "renovate/nginx-1.x" renovate-output.log; then
echo "Error: Expected 'renovate/nginx-1.x' branch not found in output."
exit 1
fi
echo "Checking for onboarding PR..."
if ! grep -q "Would create onboarding PR" renovate-output.log; then
echo "Error: Expected onboarding PR creation not found."
exit 1
fi
echo "Test passed!"
rm renovate-output.log