From f2cf4d5145e5c5f039a648aa8e370bc9bb1a4809 Mon Sep 17 00:00:00 2001 From: Oliver Lipkau Date: Tue, 25 Aug 2026 11:32:35 +0200 Subject: [PATCH 1/3] ci: reduce scheduled workflow runs --- .github/workflows/continuous_release.yml | 1 + .github/workflows/integration_tests.yml | 2 +- Tests/Tools/WorkflowTriggers.Unit.Tests.ps1 | 20 ++++++++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 Tests/Tools/WorkflowTriggers.Unit.Tests.ps1 diff --git a/.github/workflows/continuous_release.yml b/.github/workflows/continuous_release.yml index 96522eb..41b8bec 100644 --- a/.github/workflows/continuous_release.yml +++ b/.github/workflows/continuous_release.yml @@ -4,6 +4,7 @@ on: workflow_run: workflows: [CI] types: [completed] + branches: [master] workflow_dispatch: inputs: release_impact: diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 64fe033..111303a 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -2,7 +2,7 @@ name: Integration Tests on: schedule: - - cron: "30 5 * * *" + - cron: "30 5 * * 0" workflow_dispatch: inputs: track: diff --git a/Tests/Tools/WorkflowTriggers.Unit.Tests.ps1 b/Tests/Tools/WorkflowTriggers.Unit.Tests.ps1 new file mode 100644 index 0000000..2f06409 --- /dev/null +++ b/Tests/Tools/WorkflowTriggers.Unit.Tests.ps1 @@ -0,0 +1,20 @@ +#requires -modules @{ ModuleName = "Pester"; ModuleVersion = "5.9.0"; MaximumVersion = "5.9.999" } + +Describe 'GitHub Actions workflow triggers' -Tag Unit { + BeforeAll { + $workflowRoot = Join-Path "$PSScriptRoot/../.." '.github/workflows' + } + + It 'starts continuous release only for completed CI runs on master' { + $workflow = Get-Content (Join-Path $workflowRoot 'continuous_release.yml') -Raw + + $workflow | Should -Match '(?ms)workflow_run:.*?workflows:\s*\[CI\].*?types:\s*\[completed\].*?branches:\s*\[master\]' + } + + It 'runs integration tests weekly and on demand' { + $workflow = Get-Content (Join-Path $workflowRoot 'integration_tests.yml') -Raw + + $workflow | Should -Match 'cron:\s*"30 5 \* \* 0"' + $workflow | Should -Match 'workflow_dispatch:' + } +} From 968787c3c51f912cea4a358ddf07a1bb4ef39597 Mon Sep 17 00:00:00 2001 From: Oliver Lipkau Date: Tue, 25 Aug 2026 11:48:10 +0200 Subject: [PATCH 2/3] test: fix workflow trigger test scope --- Tests/Tools/WorkflowTriggers.Unit.Tests.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Tests/Tools/WorkflowTriggers.Unit.Tests.ps1 b/Tests/Tools/WorkflowTriggers.Unit.Tests.ps1 index 2f06409..4571e06 100644 --- a/Tests/Tools/WorkflowTriggers.Unit.Tests.ps1 +++ b/Tests/Tools/WorkflowTriggers.Unit.Tests.ps1 @@ -2,17 +2,17 @@ Describe 'GitHub Actions workflow triggers' -Tag Unit { BeforeAll { - $workflowRoot = Join-Path "$PSScriptRoot/../.." '.github/workflows' + $script:workflowRoot = Join-Path "$PSScriptRoot/../.." '.github/workflows' } It 'starts continuous release only for completed CI runs on master' { - $workflow = Get-Content (Join-Path $workflowRoot 'continuous_release.yml') -Raw + $workflow = Get-Content (Join-Path $script:workflowRoot 'continuous_release.yml') -Raw $workflow | Should -Match '(?ms)workflow_run:.*?workflows:\s*\[CI\].*?types:\s*\[completed\].*?branches:\s*\[master\]' } It 'runs integration tests weekly and on demand' { - $workflow = Get-Content (Join-Path $workflowRoot 'integration_tests.yml') -Raw + $workflow = Get-Content (Join-Path $script:workflowRoot 'integration_tests.yml') -Raw $workflow | Should -Match 'cron:\s*"30 5 \* \* 0"' $workflow | Should -Match 'workflow_dispatch:' From 27fe1a970dcc7b0621bd443e94e53addb55f3c27 Mon Sep 17 00:00:00 2001 From: Oliver Lipkau Date: Tue, 25 Aug 2026 13:07:53 +0200 Subject: [PATCH 3/3] test: resolve workflows from repository root --- Tests/Tools/WorkflowTriggers.Unit.Tests.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Tests/Tools/WorkflowTriggers.Unit.Tests.ps1 b/Tests/Tools/WorkflowTriggers.Unit.Tests.ps1 index 4571e06..5e9cc45 100644 --- a/Tests/Tools/WorkflowTriggers.Unit.Tests.ps1 +++ b/Tests/Tools/WorkflowTriggers.Unit.Tests.ps1 @@ -2,7 +2,9 @@ Describe 'GitHub Actions workflow triggers' -Tag Unit { BeforeAll { - $script:workflowRoot = Join-Path "$PSScriptRoot/../.." '.github/workflows' + . "$PSScriptRoot/../Helpers/TestTools.ps1" + $script:projectRoot = Resolve-ProjectRoot + $script:workflowRoot = Join-Path $script:projectRoot '.github/workflows' } It 'starts continuous release only for completed CI runs on master' {