Skip to content

Commit

Permalink
patch: run workflow on PR into default branch only (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-fields authored Sep 26, 2023
1 parent 943e742 commit 1859f94
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
name: CI/CD
on:
push:
# only on PRs into default branch
pull_request:
branches:
- master

jobs:
# runs on branch pushes only
ci_unit:
name: Run Unit Tests
if: startsWith(github.ref, 'refs/heads')
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -26,7 +27,6 @@ jobs:

ci_integration:
name: Run Integration Tests
if: startsWith(github.ref, 'refs/heads')
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -137,7 +137,6 @@ jobs:

ci_integration_envvar:
name: Run Integration Env Var Tests
if: startsWith(github.ref, 'refs/heads')
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -159,7 +158,6 @@ jobs:

ci_integration_large_output:
name: Run Integration Large Output Tests
if: startsWith(github.ref, 'refs/heads')
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -191,7 +189,6 @@ jobs:

ci_integration_retry_on_exit_code:
name: Run Integration retry_on_exit_code Tests
if: startsWith(github.ref, 'refs/heads')
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -240,7 +237,6 @@ jobs:

ci_integration_continue_on_error:
name: Run Integration continue_on_error Tests
if: startsWith(github.ref, 'refs/heads')
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -288,7 +284,6 @@ jobs:

ci_integration_retry_wait_seconds:
name: Run Integration Tests (retry_wait_seconds)
if: startsWith(github.ref, 'refs/heads')
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -325,7 +320,6 @@ jobs:

ci_integration_on_retry_cmd:
name: Run Integration Tests (on_retry_command)
if: startsWith(github.ref, 'refs/heads')
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -369,7 +363,6 @@ jobs:
# timeout tests take longer to run so run in parallel
ci_integration_timeout_seconds:
name: Run Integration Timeout Tests (seconds)
if: startsWith(github.ref, 'refs/heads')
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -400,7 +393,6 @@ jobs:

ci_integration_timeout_retry_on_timeout:
name: Run Integration Timeout Tests (retry_on timeout)
if: startsWith(github.ref, 'refs/heads')
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -432,7 +424,6 @@ jobs:

ci_integration_timeout_retry_on_error:
name: Run Integration Timeout Tests (retry_on error)
if: startsWith(github.ref, 'refs/heads')
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -468,7 +459,6 @@ jobs:

ci_integration_timeout_minutes:
name: Run Integration Timeout Tests (minutes)
if: startsWith(github.ref, 'refs/heads')
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -499,7 +489,6 @@ jobs:

ci_windows:
name: Run Windows Tests
if: startsWith(github.ref, 'refs/heads')
runs-on: windows-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -571,7 +560,7 @@ jobs:
steps:
- run: echo "If this is hit, all tests successfully passed"

# runs on push to master only
# runs on merge to master only
cd:
name: Publish Action
needs: [ci_all_tests_passed]
Expand Down

0 comments on commit 1859f94

Please sign in to comment.