Skip to content

Commit d37294b

Browse files
committed
feat: simplify logging
fix: yml syntax
1 parent f1785b6 commit d37294b

File tree

1 file changed

+13
-27
lines changed

1 file changed

+13
-27
lines changed

.github/workflows/android-regression.yml

Lines changed: 13 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -43,30 +43,15 @@ on:
4343
- '2'
4444
default: '0'
4545

46-
PRINT_FAILED_TEST_LOGS:
47-
description: 'print failed test logs (1 to enable) - DONT DO FOR FULL REGRESSION (it crashes github)'
46+
LOG_LEVEL:
47+
description: 'Test logging verbosity (WARNING: anything other than minimal mode may crash GitHub Actions on large test runs)'
4848
required: true
4949
type: choice
5050
options:
51-
- '0'
52-
- '1'
53-
default: '0'
54-
PRINT_ONGOING_TEST_LOGS:
55-
description: 'print ongoing test logs (1 to enable) - DONT DO FOR FULL REGRESSION (it crashes github)'
56-
required: true
57-
type: choice
58-
options:
59-
- '0'
60-
- '1'
61-
default: '0'
62-
HIDE_WEBDRIVER_LOGS:
63-
description: 'print webdriver logs (1 to hide, 0 to show). PRINT_ONGOING_TEST_LOGS or PRINT_FAILED_TEST_LOGS must be 1'
64-
required: true
65-
type: choice
66-
options:
67-
- '0'
68-
- '1'
69-
default: '1'
51+
- 'minimal' # Recommended for full regressions
52+
- 'failures' # Show failed test logs only
53+
- 'verbose' # All test logs - use with caution!
54+
default: 'minimal'
7055

7156
jobs:
7257
android-regression:
@@ -83,8 +68,9 @@ jobs:
8368
APPIUM_ADB_FULL_PATH: '/opt/android/platform-tools/adb'
8469
ANDROID_SDK_ROOT: '/opt/android'
8570
PLAYWRIGHT_RETRIES_COUNT: ${{ github.event.inputs.PLAYWRIGHT_RETRIES_COUNT }}
86-
PRINT_FAILED_TEST_LOGS: ${{ github.event.inputs.PRINT_FAILED_TEST_LOGS }}
87-
PRINT_ONGOING_TEST_LOGS: ${{ github.event.inputs.PRINT_ONGOING_TEST_LOGS }}
71+
PRINT_FAILED_TEST_LOGS: ${{ github.event.inputs.LOG_LEVEL != 'minimal' && '1' || '0' }}
72+
PRINT_ONGOING_TEST_LOGS: ${{ github.event.inputs.LOG_LEVEL == 'verbose' && '1' || '0' }}
73+
HIDE_WEBDRIVER_LOGS: ${{ github.event.inputs.LOG_LEVEL == 'minimal' && '1' || '0' }}
8874
IOS_1_SIMULATOR: '<just_not_empty>'
8975
IOS_2_SIMULATOR: '<just_not_empty>'
9076
IOS_3_SIMULATOR: '<just_not_empty>'
@@ -107,15 +93,15 @@ jobs:
10793
uses: ./github/actions/fetch-allure-history
10894
if: ${{ env.ALLURE_ENABLED == 'true' }}
10995
with:
110-
PLATFORM: ${{env.PLATFORM}}
111-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN}}
96+
PLATFORM: ${{ env.PLATFORM }}
97+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11298

11399
- uses: ./github/actions/print-runner-details
114100
with:
115101
APK_URL: ${{ github.event.inputs.APK_URL }}
116102
RISK: ${{ github.event.inputs.RISK }}
117-
PRINT_FAILED_TEST_LOGS: ${{ github.event.inputs.PRINT_FAILED_TEST_LOGS }}
118-
PRINT_ONGOING_TEST_LOGS: ${{ github.event.inputs.PRINT_ONGOING_TEST_LOGS }}
103+
PRINT_FAILED_TEST_LOGS: ${{ env.PRINT_FAILED_TEST_LOGS }}
104+
PRINT_ONGOING_TEST_LOGS: ${{ env.PRINT_ONGOING_TEST_LOGS }}
119105
PLAYWRIGHT_RETRIES_COUNT: ${{ github.event.inputs.PLAYWRIGHT_RETRIES_COUNT }}
120106

121107
- name: Download APK & extract it

0 commit comments

Comments
 (0)