Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport of Update the if conditions for test-go jobs in CI into release/1.13.x #19872

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update the if conditions for test-go jobs in CI
  • Loading branch information
kubawi committed Apr 3, 2023
commit ded2e6fb8a38e16fa7b09de6bada5286cdbae307
32 changes: 24 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,12 @@ jobs:
needs:
- setup
- setup-go-cache
# Don't run this job for branches starting with 'ui/', 'docs/', or 'backport/docs/'
if: ${{ ! (startsWith( github.ref_name, 'ui/' ) || startsWith( github.ref_name, 'docs/' ) || startsWith( github.ref_name, 'backport/docs/') ) }}
# Don't run this job for PR branches starting with 'ui/', 'backport/docs/', 'docs/', or 'backport/docs/'
if: |
!startsWith(github.head_ref, 'ui/') &&
!startsWith(github.head_ref, 'backport/ui/') &&
!startsWith(github.head_ref, 'docs/') &&
!startsWith(github.head_ref, 'backport/docs/')
uses: ./.github/workflows/test-go.yml
with:
total-runners: 16
Expand All @@ -130,8 +134,12 @@ jobs:
needs:
- setup
- setup-go-cache
# Don't run this job for branches starting with 'ui/', 'docs/', or 'backport/docs/'
if: ${{ ! (startsWith( github.ref_name, 'ui/' ) || startsWith( github.ref_name, 'docs/' ) || startsWith( github.ref_name, 'backport/docs/') ) }}
# Don't run this job for PR branches starting with 'ui/', 'backport/docs/', 'docs/', or 'backport/docs/'
if: |
!startsWith(github.head_ref, 'ui/') &&
!startsWith(github.head_ref, 'backport/ui/') &&
!startsWith(github.head_ref, 'docs/') &&
!startsWith(github.head_ref, 'backport/docs/')
uses: ./.github/workflows/test-go.yml
with:
total-runners: 16
Expand All @@ -147,10 +155,13 @@ jobs:
secrets: inherit
test-go-fips:
name: Run Go tests with FIPS configuration
# Only run this job for the enterprise repo if the branch doesn't start with 'ui/', 'docs/', or 'backport/docs/'.
# Only run this job for the enterprise repo if the PR branch doesn't start with 'ui/', 'backport/docs/', 'docs/', or 'backport/docs/'
if: |
needs.setup.outputs.enterprise == 1 &&
! (startsWith( github.ref_name, 'ui/' ) || startsWith( github.ref_name, 'docs/' ) || startsWith( github.ref_name, 'backport/docs/'))
!startsWith(github.head_ref, 'ui/') &&
!startsWith(github.head_ref, 'backport/ui/') &&
!startsWith(github.head_ref, 'docs/') &&
!startsWith(github.head_ref, 'backport/docs/')
needs:
- setup
- setup-go-cache
Expand All @@ -168,8 +179,13 @@ jobs:
secrets: inherit
test-ui:
name: Test UI
# The test-ui Job is only run for pushes to main, ui/*, backport/ui/*, release/*, and merge*
if: github.ref_name == 'main' || startsWith(github.ref_name, 'ui/') || startsWith(github.ref_name, 'backport/ui/') || startsWith(github.ref_name, 'release/') || startsWith(github.ref_name, 'merge')
# The test-ui Job is only run for pushes to main and pull requests, ui/*, backport/ui/*, release/*, and merge*
if: |
github.ref_name == 'main' ||
startsWith(github.head_ref, 'ui/') ||
startsWith(github.head_ref, 'backport/ui/') ||
startsWith(github.head_ref, 'release/') ||
startsWith(github.head_ref, 'merge')
needs:
- setup
permissions:
Expand Down