Skip to content

Commit d061826

Browse files
authored
CI: Speed up merge checks: linux only, no coverage (#3917)
## Why Reduce waiting for merge queue. We still run full tests on PR (without coverage) and on every commit to main with coverage.
1 parent cc9703f commit d061826

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

.github/workflows/push.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,7 @@ jobs:
3838
strategy:
3939
fail-fast: false
4040
matrix:
41-
os:
42-
- macos-latest
43-
- ubuntu-latest
44-
- windows-latest
41+
os: ${{ github.event_name == 'merge_group' && fromJSON('["ubuntu-latest"]') || fromJSON('["macos-latest", "ubuntu-latest", "windows-latest"]') }}
4542
deployment:
4643
- "terraform"
4744
- "direct"
@@ -83,17 +80,17 @@ jobs:
8380
pip3 install wheel==0.45.1
8481
8582
- name: Run tests without coverage
86-
# We run tests without coverage on PR because we don't make use of coverage information
83+
# We run tests without coverage on PR, merge_group, and schedule because we don't make use of coverage information
8784
# and would like to run the tests as fast as possible. We run it on schedule as well, because that is what
8885
# populates the cache and cache may include test results.
89-
if: ${{ github.event_name == 'pull_request' || github.event_name == 'schedule' }}
86+
if: ${{ github.event_name == 'pull_request' || github.event_name == 'merge_group' || github.event_name == 'schedule' }}
9087
env:
9188
ENVFILTER: DATABRICKS_BUNDLE_ENGINE=${{ matrix.deployment }}
9289
run: make test
9390

9491
- name: Run tests with coverage
95-
# Still run 'make cover' on push to main and merge checks to make sure it does not get broken.
96-
if: ${{ github.event_name != 'pull_request' && github.event_name != 'schedule' }}
92+
# Only run 'make cover' on push to main to make sure it does not get broken.
93+
if: ${{ github.event_name == 'push' }}
9794
env:
9895
ENVFILTER: DATABRICKS_BUNDLE_ENGINE=${{ matrix.deployment }}
9996
run: make cover

0 commit comments

Comments
 (0)