File tree Expand file tree Collapse file tree 3 files changed +26
-7
lines changed Expand file tree Collapse file tree 3 files changed +26
-7
lines changed Original file line number Diff line number Diff line change 12
12
Check-Beta-Version :
13
13
runs-on : ubuntu-latest
14
14
outputs :
15
- reportable : ${{ steps.reportable.outputs.test }}
15
+ win_reportable : ${{ steps.reportable.outputs.win }}
16
+ mac_reportable : ${{ steps.reportable.outputs.mac }}
16
17
steps :
17
18
- name : Checkout repository
18
19
uses : actions/checkout@v4
26
27
run : |
27
28
pip3 install 'pipenv==2023.11.15';
28
29
pipenv install
29
- echo test=$(pipenv run python -c 'from modules import testrail_integration as tri; print(tri.reportable())') >> "$GITHUB_OUTPUT"
30
- Run-Smoke-Tests :
30
+ echo win=$(pipenv run python -c 'from modules import testrail_integration as tri; print(tri.reportable("Windows"))') >> "$GITHUB_OUTPUT"
31
+ echo mac=$(pipenv run python -c 'from modules import testrail_integration as tri; print(tri.reportable("Darwin"))') >> "$GITHUB_OUTPUT"
32
+ Run-Win-Smoke :
31
33
needs : Check-Beta-Version
32
- if : ${{ needs.Check-Beta-Version.outputs.reportable == 'True' }}
34
+ if : ${{ needs.Check-Beta-Version.outputs.win_reportable == 'True' }}
33
35
uses : ./.github/workflows/smoke.yml
36
+ with :
37
+ job_to_run : Smoke-Windows
34
38
secrets : inherit
39
+
40
+ Run-Mac-Smoke :
41
+ needs : Check-Beta-Version
42
+ if : ${{ needs.Check-Beta-Version.outputs.mac_reportable == 'True' }}
43
+ uses : ./.github/workflows/smoke.yml
44
+ with :
45
+ job_to_run : Smoke-MacOS
46
+ secrets : inherit
47
+
Original file line number Diff line number Diff line change @@ -5,6 +5,10 @@ run-name: ${{ github.actor }} is running smoke tests
5
5
on :
6
6
pull_request :
7
7
workflow_call :
8
+ inputs :
9
+ job_to_run :
10
+ required : true
11
+ type : string
8
12
env :
9
13
TESTRAIL_BASE_URL : ${{ secrets.TESTRAIL_BASE_URL }}
10
14
TESTRAIL_API_KEY : ${{ secrets.TESTRAIL_API_KEY }}
30
34
with :
31
35
python-version : " 3.11"
32
36
- name : Set Environment
33
- if : ${{ github.event_name == 'schedule ' }}
37
+ if : ${{ inputs.job_to_run == 'Smoke-Windows ' }}
34
38
run : |
35
39
$env_contents = @"
36
40
TESTRAIL_REPORT='true'
@@ -128,7 +132,7 @@ jobs:
128
132
exit $?
129
133
echo "Triggered by event: ${{ github.event_name }}"
130
134
- name : Set Environment
131
- if : ${{ github.event_name == 'schedule ' }}
135
+ if : ${{ inputs.job_to_run == 'Smoke-MacOS ' }}
132
136
run : |
133
137
echo "TESTRAIL_REPORT='true'" >> "$GITHUB_ENV";
134
138
echo "Running report for most recent Beta on MacOS";
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ def tc_reportable():
63
63
sys .exit (100 )
64
64
65
65
66
- def reportable ():
66
+ def reportable (platform_to_test = None ):
67
67
"""Return true if we should report to TestRail"""
68
68
import platform
69
69
@@ -118,6 +118,8 @@ def reportable():
118
118
)
119
119
return True
120
120
121
+ if platform_to_test :
122
+ sys_platform = platform_to_test
121
123
platform = "MacOS" if sys_platform == "Darwin" else sys_platform
122
124
123
125
plan_entries = this_plan .get ("entries" )
You can’t perform that action at this time.
0 commit comments