Skip to content

Commit 7be9869

Browse files
committed
ci: optimize runner usage with conditional OS matrix and parallel limit
- Only run full OS matrix (ubuntu-24.04, macos-14, windows-latest) on main branch pushes - PR branches use ubuntu-24.04 only to reduce runner wait time - Add max-parallel: 2 to limit concurrent job execution
1 parent b131bb6 commit 7be9869

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

.github/workflows/api_test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ jobs:
4444
runs-on: ${{ matrix.os }}
4545
strategy:
4646
fail-fast: false
47+
max-parallel: 2
4748
matrix:
48-
os: [ubuntu-24.04, ubuntu-24.04-arm, macos-14, macos-15-intel, windows-latest]
49+
os: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/main') && fromJSON('["ubuntu-24.04", "macos-14", "windows-latest"]') || fromJSON('["ubuntu-24.04"]') }}
4950

5051
steps:
5152
- uses: actions/checkout@v6

0 commit comments

Comments
 (0)