11name : CI/CD
22on :
3- push :
3+ # only on PRs into default branch
4+ pull_request :
5+ branches :
6+ - master
47
58jobs :
6- # runs on branch pushes only
79 ci_unit :
810 name : Run Unit Tests
9- if : startsWith(github.ref, 'refs/heads')
1011 runs-on : ubuntu-latest
1112 steps :
1213 - name : Checkout
2627
2728 ci_integration :
2829 name : Run Integration Tests
29- if : startsWith(github.ref, 'refs/heads')
3030 runs-on : ubuntu-latest
3131 steps :
3232 - name : Checkout
@@ -137,7 +137,6 @@ jobs:
137137
138138 ci_integration_envvar :
139139 name : Run Integration Env Var Tests
140- if : startsWith(github.ref, 'refs/heads')
141140 runs-on : ubuntu-latest
142141 steps :
143142 - name : Checkout
@@ -159,7 +158,6 @@ jobs:
159158
160159 ci_integration_large_output :
161160 name : Run Integration Large Output Tests
162- if : startsWith(github.ref, 'refs/heads')
163161 runs-on : ubuntu-latest
164162 steps :
165163 - name : Checkout
@@ -191,7 +189,6 @@ jobs:
191189
192190 ci_integration_retry_on_exit_code :
193191 name : Run Integration retry_on_exit_code Tests
194- if : startsWith(github.ref, 'refs/heads')
195192 runs-on : ubuntu-latest
196193 steps :
197194 - name : Checkout
@@ -240,7 +237,6 @@ jobs:
240237
241238 ci_integration_continue_on_error :
242239 name : Run Integration continue_on_error Tests
243- if : startsWith(github.ref, 'refs/heads')
244240 runs-on : ubuntu-latest
245241 steps :
246242 - name : Checkout
@@ -288,7 +284,6 @@ jobs:
288284
289285 ci_integration_retry_wait_seconds :
290286 name : Run Integration Tests (retry_wait_seconds)
291- if : startsWith(github.ref, 'refs/heads')
292287 runs-on : ubuntu-latest
293288 steps :
294289 - name : Checkout
@@ -325,7 +320,6 @@ jobs:
325320
326321 ci_integration_on_retry_cmd :
327322 name : Run Integration Tests (on_retry_command)
328- if : startsWith(github.ref, 'refs/heads')
329323 runs-on : ubuntu-latest
330324 steps :
331325 - name : Checkout
@@ -369,7 +363,6 @@ jobs:
369363 # timeout tests take longer to run so run in parallel
370364 ci_integration_timeout_seconds :
371365 name : Run Integration Timeout Tests (seconds)
372- if : startsWith(github.ref, 'refs/heads')
373366 runs-on : ubuntu-latest
374367 steps :
375368 - name : Checkout
@@ -400,7 +393,6 @@ jobs:
400393
401394 ci_integration_timeout_retry_on_timeout :
402395 name : Run Integration Timeout Tests (retry_on timeout)
403- if : startsWith(github.ref, 'refs/heads')
404396 runs-on : ubuntu-latest
405397 steps :
406398 - name : Checkout
@@ -432,7 +424,6 @@ jobs:
432424
433425 ci_integration_timeout_retry_on_error :
434426 name : Run Integration Timeout Tests (retry_on error)
435- if : startsWith(github.ref, 'refs/heads')
436427 runs-on : ubuntu-latest
437428 steps :
438429 - name : Checkout
@@ -468,7 +459,6 @@ jobs:
468459
469460 ci_integration_timeout_minutes :
470461 name : Run Integration Timeout Tests (minutes)
471- if : startsWith(github.ref, 'refs/heads')
472462 runs-on : ubuntu-latest
473463 steps :
474464 - name : Checkout
@@ -499,7 +489,6 @@ jobs:
499489
500490 ci_windows :
501491 name : Run Windows Tests
502- if : startsWith(github.ref, 'refs/heads')
503492 runs-on : windows-latest
504493 steps :
505494 - name : Checkout
@@ -571,7 +560,7 @@ jobs:
571560 steps :
572561 - run : echo "If this is hit, all tests successfully passed"
573562
574- # runs on push to master only
563+ # runs on merge to master only
575564 cd :
576565 name : Publish Action
577566 needs : [ci_all_tests_passed]
0 commit comments