mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 17:50:20 +00:00
Skip workflows that do not have matrix
This commit is contained in:
parent
91d52c2a79
commit
4145006721
2 changed files with 8 additions and 0 deletions
3
.github/workflows/test-action.yml
vendored
3
.github/workflows/test-action.yml
vendored
|
@ -67,6 +67,7 @@ jobs:
|
|||
|
||||
test-linux:
|
||||
name: ${{ matrix.display_name }} ${{ matrix.tests-chunk }} ${{ matrix.transport }}
|
||||
if: ${{ fromJSON(inputs.matrix)['linux'] != [] }}
|
||||
runs-on:
|
||||
- ${{ matrix.arch == 'x86_64' && 'ubuntu-22.04' || 'linux-arm64' }}
|
||||
container:
|
||||
|
@ -316,6 +317,7 @@ jobs:
|
|||
runs-on: ${{ matrix.runner }}
|
||||
# Full test runs. Each chunk should never take more than 2 hours.
|
||||
# Partial test runs(no chunk parallelization), 6 Hours
|
||||
if: ${{ fromJSON(inputs.matrix)['macos'] != [] }}
|
||||
timeout-minutes: ${{ fromJSON(inputs.testrun)['type'] == 'full' && inputs.default-timeout || 360 }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
@ -546,6 +548,7 @@ jobs:
|
|||
|
||||
test-windows:
|
||||
name: ${{ matrix.display_name }} ${{ matrix.tests-chunk }} ${{ matrix.transport }}
|
||||
if: ${{ fromJSON(inputs.matrix)['windows'] != [] }}
|
||||
runs-on: ${{ matrix.slug }}
|
||||
# Full test runs. Each chunk should never take more than 2 hours.
|
||||
# Partial test runs(no chunk parallelization), 6 Hours
|
||||
|
|
|
@ -1515,6 +1515,10 @@ def workflow_config(
|
|||
gh_event_path = os.environ.get("GITHUB_EVENT_PATH") or None
|
||||
gh_event = None
|
||||
ctx.info(f"Github event path is {gh_event_path}")
|
||||
|
||||
if event_name != "pull_request":
|
||||
full = True
|
||||
|
||||
if gh_event_path is None:
|
||||
labels = []
|
||||
else:
|
||||
|
@ -1532,6 +1536,7 @@ def workflow_config(
|
|||
else:
|
||||
labels = []
|
||||
ctx.warn("The 'pull_request' key was not found on the event payload.")
|
||||
|
||||
ctx.info(f"{'==== labels ====':^80s}")
|
||||
ctx.info(f"{pprint.pformat(labels)}")
|
||||
ctx.info(f"{'==== end labels ====':^80s}")
|
||||
|
|
Loading…
Add table
Reference in a new issue