diff --git a/.gitea/workflows/sync-superpowers.yml b/.gitea/workflows/sync-superpowers.yml index 3fb3888..165684a 100644 --- a/.gitea/workflows/sync-superpowers.yml +++ b/.gitea/workflows/sync-superpowers.yml @@ -1,6 +1,9 @@ name: Sync Superpowers Skills on: + push: + branches: + - thirdparty/skill workflow_dispatch: concurrency: diff --git a/.gitea/workflows/update-thirdparty-superpowers.yml b/.gitea/workflows/update-thirdparty-superpowers.yml index 0c8dcf4..d0d014a 100644 --- a/.gitea/workflows/update-thirdparty-superpowers.yml +++ b/.gitea/workflows/update-thirdparty-superpowers.yml @@ -5,6 +5,8 @@ on: branches: - main workflow_dispatch: + schedule: + - cron: "@daily" concurrency: group: thirdparty-superpowers-update-${{ github.repository }} diff --git a/tests/test_superpowers_workflows.py b/tests/test_superpowers_workflows.py index 33adb72..0c99801 100644 --- a/tests/test_superpowers_workflows.py +++ b/tests/test_superpowers_workflows.py @@ -13,6 +13,11 @@ class SuperpowersWorkflowTests(unittest.TestCase): text = SYNC_WORKFLOW.read_text(encoding="utf-8") self.assertIn("workflow_dispatch:", text) + def test_sync_workflow_triggers_on_thirdparty_push(self): + text = SYNC_WORKFLOW.read_text(encoding="utf-8") + self.assertIn("push:", text) + self.assertIn("- thirdparty/skill", text) + def test_sync_workflow_clears_stale_index_flags(self): text = SYNC_WORKFLOW.read_text(encoding="utf-8") self.assertIn("git update-index --no-assume-unchanged", text) @@ -33,6 +38,11 @@ class SuperpowersWorkflowTests(unittest.TestCase): self.assertIn("- main", text) self.assertIn("workflow_dispatch:", text) + def test_auto_update_workflow_runs_daily_schedule(self): + text = AUTO_UPDATE_WORKFLOW.read_text(encoding="utf-8") + self.assertIn("schedule:", text) + self.assertIn('- cron: "@daily"', text) + def test_auto_update_workflow_runs_update_script(self): text = AUTO_UPDATE_WORKFLOW.read_text(encoding="utf-8") self.assertIn("bash .gitea/ci/update_thirdparty_superpowers.sh", text)