Skip to content

Commit 94e1e30

Browse files
committed
[CICD] Only run mac tests on main (#563)
## Summary mac tests are really slow (failing because they hit timeout). This increases the timeout to 20 minutes but only runs it on main. ## How was it tested? CICD
1 parent 9624bf6 commit 94e1e30

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

.github/workflows/cli-release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ permissions:
2727
jobs:
2828
tests:
2929
uses: ./.github/workflows/cli-tests.yaml
30+
with:
31+
run-mac-tests: true
3032

3133
prerelease:
3234
runs-on: ubuntu-latest

.github/workflows/cli-tests.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111
branches:
1212
- main
1313
workflow_call:
14+
inputs:
15+
run-mac-tests:
16+
type: boolean
1417
workflow_dispatch:
1518

1619
permissions:
@@ -29,7 +32,7 @@ jobs:
2932
golangci-lint:
3033
strategy:
3134
matrix:
32-
os: [ubuntu-latest, macos-12]
35+
os: [ubuntu-latest, macos-latest]
3336
runs-on: ${{ matrix.os }}
3437
timeout-minutes: 10
3538
steps:
@@ -59,9 +62,13 @@ jobs:
5962
test:
6063
strategy:
6164
matrix:
62-
os: [ubuntu-latest, macos-12]
65+
os: [ubuntu-latest, macos-latest]
66+
exclude:
67+
# This expression basically says run mac tests if on main branch or
68+
# if this job is triggered by another workflow with "with: run-mac-tests: true"
69+
- os: ${{ (github.ref == 'refs/heads/main' || inputs.run-mac-tests) && 'dummy' || 'macos-latest' }}
6370
runs-on: ${{ matrix.os }}
64-
timeout-minutes: 15
71+
timeout-minutes: ${{ (github.ref == 'refs/heads/main' || inputs.run-mac-tests) && '20' || '10' }}
6572
steps:
6673
- uses: actions/checkout@v3
6774
- uses: actions/[email protected]

0 commit comments

Comments
 (0)