Skip to content

Commit 26a6796

Browse files
committed
set gha to run multiple functional splits
1 parent 58bb510 commit 26a6796

File tree

3 files changed

+15
-11
lines changed

3 files changed

+15
-11
lines changed

.github/workflows/check-beta-functional.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,23 @@ name: Check new beta version - Functional
22

33
on:
44
schedule:
5-
- cron: "55 1/5 1 * *"
5+
- cron: "55 * * * *"
66
env:
77
LATEST: ""
88
permissions:
99
contents: "write"
1010

1111
jobs:
12+
Get-Functional-Split:
13+
runs-on: ubuntu-latest
14+
outputs: ${{ steps.getsplit.outputs.split }}
15+
steps:
16+
- name: Get Split Based On Time
17+
id: getsplit
18+
run: echo "split=functional$(date +%H)" >> "$GITHUB_OUTPUT"
19+
1220
Check-Beta-Version:
21+
needs: Get-Functional-Split
1322
runs-on: ubuntu-latest
1423
outputs:
1524
win_reportable: ${{ steps.reportable.outputs.win }}
@@ -23,7 +32,7 @@ jobs:
2332
- name: Check if the run is reportable
2433
id: reportable
2534
env:
26-
STARFOX_SPLIT: functional1
35+
STARFOX_SPLIT: ${{ steps.getsplit.outputs.split }}
2736
TESTRAIL_REPORT: true
2837
TESTRAIL_BASE_URL: ${{ secrets.TESTRAIL_BASE_URL }}
2938
TESTRAIL_API_KEY: ${{ secrets.TESTRAIL_API_KEY }}
@@ -40,7 +49,7 @@ jobs:
4049
uses: ./.github/workflows/main.yml
4150
with:
4251
job_to_run: Test-Windows
43-
test_set: functional
52+
test_set: ${{ steps.getsplit.outputs.split }}
4453
secrets: inherit
4554

4655
Run-Mac-Functional:
@@ -49,5 +58,5 @@ jobs:
4958
uses: ./.github/workflows/main.yml
5059
with:
5160
job_to_run: Test-MacOS
52-
test_set: functional
61+
test_set: ${{ steps.getsplit.outputs.split }}
5362
secrets: inherit

.github/workflows/main.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,6 @@ jobs:
7070
run: |
7171
echo "STARFOX_SPLIT=$TEST_SET" | Out-File -FilePath .env -Encoding utf8 -Append -Force
7272
shell: pwsh
73-
- name: Set Functional Split
74-
if: ${{ inputs.test_set == 'functional' }}
75-
run: |
76-
echo "STARFOX_SPLIT=$TEST_SET1" | Out-File -FilePath .env -Encoding utf8 -Append -Force
7773
- name: Install dependencies
7874
run: |
7975
mkdir -p artifacts;
@@ -175,9 +171,6 @@ jobs:
175171
- name: Select Test Set
176172
if: ${{ inputs.test_set != null }}
177173
run: echo "STARFOX_SPLIT=$TEST_SET" >> .env
178-
- name: Set Functional Split
179-
if: ${{ inputs.test_set == 'functional' }}
180-
run: echo "STARFOX_SPLIT=$TEST_SET1" >> .env
181174
- name: Set Environment (Manual)
182175
if: ${{ inputs.mac_installer_link }}
183176
run: |

modules/testrail_integration.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,8 @@ def reportable(platform_to_test=None):
297297
expected_suites = manifest.get_valid_suites_in_split(
298298
os.environ["STARFOX_SPLIT"], suite_numbers=True
299299
)
300+
if not expected_suites:
301+
logging.warning("This split is empty, not running or reporting.")
300302

301303
uncovered_suites = list(set(expected_suites) - set(covered_suites))
302304
if len(uncovered_suites):

0 commit comments

Comments
 (0)