Added renovate tests
All checks were successful
Test Renovate Config / test-renovate (push) Successful in 1m25s
Test Renovate Config / test-renovate (pull_request) Successful in 49s

This commit is contained in:
2025-11-22 14:03:24 +01:00
parent 691e14b642
commit e09ed170d7
2 changed files with 52 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
name: Test Renovate Config
on:
push:
pull_request:
jobs:
test-renovate:
runs-on: ubuntu-latest
container: ghcr.io/renovatebot/renovate:42.8.1
steps:
- name: Checkout
uses: actions/checkout@v5.0.0
- name: Run Renovate Test Script
run: bash scripts/test-renovate.sh
env:
RENOVATE_CONFIG_FILE: "/workspace/kovagoadi.hu/Renovate/renovate-config.js"
LOG_LEVEL: "debug"
RENOVATE_TOKEN: ${{ secrets.RENOVATE_TEST_TOKEN }}
GITHUB_COM_TOKEN: ${{ secrets.RENOVATE_GITHUB_TOKEN }}

32
scripts/test-renovate.sh Executable file
View File

@@ -0,0 +1,32 @@
#!/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
# Example assertion: Check if a specific dependency update is planned
# echo "Checking for expected update..."
# if ! grep -q "update-dependency" renovate-output.log; then
# echo "Error: Expected dependency update not found."
# exit 1
# fi
echo "Test passed!"
rm renovate-output.log