diff --git a/.github/workflows/rebuild.yml b/.github/workflows/rebuild.yml index b3c40dd7f..cfce78713 100644 --- a/.github/workflows/rebuild.yml +++ b/.github/workflows/rebuild.yml @@ -77,7 +77,7 @@ jobs: cd pr-checks python -m pip install --upgrade pip pip install ruamel.yaml==0.17.31 - python3 sync-back.py + python3 sync_back.py python3 sync.py - name: "Merge in progress: Finish merge and push" diff --git a/pr-checks/readme.md b/pr-checks/readme.md index 042e288e0..58c6b9412 100644 --- a/pr-checks/readme.md +++ b/pr-checks/readme.md @@ -27,10 +27,10 @@ To sync action versions from generated workflows back to source templates: ```bash # Dry run to see what would be changed -python3 pr-checks/sync-back.py --dry-run --verbose +python3 pr-checks/sync_back.py --dry-run --verbose # Actually apply the changes -python3 pr-checks/sync-back.py +python3 pr-checks/sync_back.py ``` The sync-back script automatically updates: diff --git a/pr-checks/sync-back.py b/pr-checks/sync_back.py similarity index 100% rename from pr-checks/sync-back.py rename to pr-checks/sync_back.py diff --git a/pr-checks/test_sync_back.py b/pr-checks/test_sync_back.py index eeb525870..37fc03133 100644 --- a/pr-checks/test_sync_back.py +++ b/pr-checks/test_sync_back.py @@ -1,22 +1,20 @@ #!/usr/bin/env python3 """ -Tests for the sync-back.py script +Tests for the sync_back.py script """ import os -import tempfile import shutil -import unittest -from pathlib import Path -from unittest.mock import patch import sys +import tempfile +import unittest # Add the current directory to sys.path and import the sync_back module sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) # Import the sync-back module import importlib.util -spec = importlib.util.spec_from_file_location("sync_back", os.path.join(os.path.dirname(__file__), "sync-back.py")) +spec = importlib.util.spec_from_file_location("sync_back", os.path.join(os.path.dirname(__file__), "sync_back.py")) sync_back = importlib.util.module_from_spec(spec) spec.loader.exec_module(sync_back)