Skip to content

Commit 28c7f1e

Browse files
author
agilira
committed
feat: intelligent OS matrix - skip macOS for Dependabot PRs
- Add skip-macos input parameter for manual override - Automatically skip macOS testing for Dependabot PRs (faster CI) - Maintains full OS testing for regular pushes and PRs - Reduces CI costs and wait times for dependency updates
1 parent fd0cac6 commit 28c7f1e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/go-ci-full.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ on:
1818
required: false
1919
default: '.gosec.json'
2020
type: string
21+
skip-macos:
22+
description: 'Skip macOS testing for faster CI'
23+
required: false
24+
default: false
25+
type: boolean
2126
secrets:
2227
CODECOV_TOKEN:
2328
description: 'Codecov token for coverage upload'
@@ -109,7 +114,8 @@ jobs:
109114
strategy:
110115
fail-fast: false
111116
matrix:
112-
os: [ubuntu-latest, windows-latest, macos-latest]
117+
# Skip macOS for Dependabot PRs (faster CI) or when explicitly requested
118+
os: ${{ (github.actor == 'dependabot[bot]' || inputs.skip-macos == true) && fromJSON('["ubuntu-latest", "windows-latest"]') || fromJSON('["ubuntu-latest", "windows-latest", "macos-latest"]') }}
113119
steps:
114120
- name: Checkout
115121
uses: actions/checkout@v5

0 commit comments

Comments
 (0)