Skip to content

Commit 4c60061

Browse files
authored
Merge pull request #67 from session-foundation/dev
Android 1.28.0, iOS 2.14.X
2 parents d11d033 + 21ecab7 commit 4c60061

File tree

104 files changed

+2665
-2074
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+2665
-2074
lines changed

.github/workflows/android-regression.yml

Lines changed: 27 additions & 32 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 stdout/stderr
53+
- 'verbose' # Ongoing and failed test logs
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+
_TESTING: 1 # Always hide webdriver logs (@appium/support/ flag)
72+
PRINT_FAILED_TEST_LOGS: ${{ github.event.inputs.LOG_LEVEL != 'minimal' && '1' || '0' }} # Show stdout/stderr if test fails (@session-foundation/playwright-reporter/ flag)
73+
PRINT_ONGOING_TEST_LOGS: ${{ github.event.inputs.LOG_LEVEL == 'verbose' && '1' || '0' }} # Show everything as it happens (@session-foundation/playwright-reporter/ flag)
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
@@ -166,9 +152,12 @@ jobs:
166152
env:
167153
PLAYWRIGHT_WORKERS_COUNT: 4
168154
DEVICES_PER_TEST_COUNT: 1
155+
_TESTING: ${{ env._TESTING }}
156+
PRINT_FAILED_TEST_LOGS: ${{ env.PRINT_FAILED_TEST_LOGS }}
157+
PRINT_ONGOING_TEST_LOGS: ${{ env.PRINT_ONGOING_TEST_LOGS }}
169158
run: |
170159
pwd
171-
TESTING=${{ github.event.inputs.HIDE_WEBDRIVER_LOGS }} npx playwright test --grep "(?=.*@${PLATFORM})(?=.*@${DEVICES_PER_TEST_COUNT}-devices)(?=.*@${{ github.event.inputs.RISK }})" #Note: this has to be double quotes
160+
npx playwright test --grep "(?=.*@${PLATFORM})(?=.*@${DEVICES_PER_TEST_COUNT}-devices)(?=.*@${{ github.event.inputs.RISK }})" #Note: this has to be double quotes
172161
173162
- name: Upload results of this run
174163
uses: ./github/actions/upload-test-results
@@ -182,25 +171,31 @@ jobs:
182171
env:
183172
PLAYWRIGHT_WORKERS_COUNT: 2
184173
DEVICES_PER_TEST_COUNT: 2
174+
_TESTING: ${{ env._TESTING }}
175+
PRINT_FAILED_TEST_LOGS: ${{ env.PRINT_FAILED_TEST_LOGS }}
176+
PRINT_ONGOING_TEST_LOGS: ${{ env.PRINT_ONGOING_TEST_LOGS }}
185177
run: |
186178
pwd
187-
_TESTING=${{ github.event.inputs.HIDE_WEBDRIVER_LOGS }} npx playwright test --grep "(?=.*@${PLATFORM})(?=.*@${DEVICES_PER_TEST_COUNT}-devices)(?=.*@${{ github.event.inputs.RISK }})" #Note: this has to be double quotes
179+
npx playwright test --grep "(?=.*@${PLATFORM})(?=.*@${DEVICES_PER_TEST_COUNT}-devices)(?=.*@${{ github.event.inputs.RISK }})" #Note: this has to be double quotes
188180
189181
- name: Upload results of this run
190182
uses: ./github/actions/upload-test-results
191183
with:
192184
PLATFORM: ${{ env.PLATFORM }}
193185
UPLOAD_IDENTIFIER: 'devices-2-test-run'
194186

195-
- name: Run the tests ​​other tests with 1 worker
187+
- name: Run the other tests with 1 worker
196188
continue-on-error: true
197189
id: other-devices-test-run
198190
env:
199191
PLAYWRIGHT_WORKERS_COUNT: 1
200192
DEVICES_PER_TEST_COUNT: 4
193+
_TESTING: ${{ env._TESTING }}
194+
PRINT_FAILED_TEST_LOGS: ${{ env.PRINT_FAILED_TEST_LOGS }}
195+
PRINT_ONGOING_TEST_LOGS: ${{ env.PRINT_ONGOING_TEST_LOGS }}
201196
run: |
202197
pwd
203-
_TESTING=${{ github.event.inputs.HIDE_WEBDRIVER_LOGS }} npx playwright test --grep "(?=.*@${PLATFORM})(?=.*@${{ github.event.inputs.RISK }})" --grep-invert "@1-devices|@2-devices" #Note: this has to be double quotes
198+
npx playwright test --grep "(?=.*@${PLATFORM})(?=.*@${{ github.event.inputs.RISK }})" --grep-invert "@1-devices|@2-devices" #Note: this has to be double quotes
204199
205200
- name: Generate and publish test report
206201
uses: ./github/actions/generate-publish-test-report
@@ -227,7 +222,7 @@ jobs:
227222
PLATFORM: ${{ env.PLATFORM }}
228223

229224
- name: Check if any tests failed
230-
if: steps.devices-1-test-run != 'success' || steps.devices-2-test-run != 'success' || steps.other-devices-test-run.outcome != 'success'
225+
if: steps.devices-1-test-run.outcome != 'success' || steps.devices-2-test-run.outcome != 'success' || steps.other-devices-test-run.outcome != 'success'
231226
run: echo 'Some test failed, see above'; exit 1
232227

233228
- name: Stop emulators

.github/workflows/ios-regression.yml

Lines changed: 16 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,6 @@ 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)'
48-
required: true
49-
type: choice
50-
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'
6246
PLAYWRIGHT_WORKERS_COUNT:
6347
description: 'number of workers to use (ios only)'
6448
required: true
@@ -68,14 +52,16 @@ on:
6852
- '2'
6953
- '3'
7054
default: '3'
71-
HIDE_WEBDRIVER_LOGS:
72-
description: 'print webdriver logs (1 to hide, 0 to show). PRINT_ONGOING_TEST_LOGS or PRINT_FAILED_TEST_LOGS must be 1'
55+
56+
LOG_LEVEL:
57+
description: 'Test logging verbosity (WARNING: anything other than minimal mode may crash GitHub Actions on large test runs)'
7358
required: true
7459
type: choice
7560
options:
76-
- '0'
77-
- '1'
78-
default: '1'
61+
- 'minimal' # Recommended for full regressions
62+
- 'failures' # Show failed test logs only
63+
- 'verbose' # All test logs - use with caution!
64+
default: 'minimal'
7965

8066
jobs:
8167
ios-regression:
@@ -92,8 +78,9 @@ jobs:
9278
APPIUM_ADB_FULL_PATH: '<just_not_empty>'
9379
ANDROID_SDK_ROOT: '<just_not_empty>'
9480
PLAYWRIGHT_RETRIES_COUNT: ${{ github.event.inputs.PLAYWRIGHT_RETRIES_COUNT }}
95-
PRINT_FAILED_TEST_LOGS: ${{ github.event.inputs.PRINT_FAILED_TEST_LOGS }}
96-
PRINT_ONGOING_TEST_LOGS: ${{ github.event.inputs.PRINT_ONGOING_TEST_LOGS }}
81+
_TESTING: 1 # Always hide webdriver logs (@appium/support/ flag)
82+
PRINT_FAILED_TEST_LOGS: ${{ github.event.inputs.LOG_LEVEL != 'minimal' && '1' || '0' }} # Show stdout/stderr if test fails (@session-foundation/playwright-reporter/ flag)
83+
PRINT_ONGOING_TEST_LOGS: ${{ github.event.inputs.LOG_LEVEL == 'verbose' && '1' || '0' }} # Show everything as it happens (@session-foundation/playwright-reporter/ flag)
9784
PLAYWRIGHT_WORKERS_COUNT: 3 # for iOS, this is the max we can have on our self-hosted runner
9885
SDK_MANAGER_FULL_PATH: '<just_not_empty>'
9986
AVD_MANAGER_FULL_PATH: '<just_not_empty>'
@@ -121,8 +108,8 @@ jobs:
121108
uses: ./github/actions/fetch-allure-history
122109
if: ${{ env.ALLURE_ENABLED == 'true' }}
123110
with:
124-
PLATFORM: ${{env.PLATFORM}}
125-
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
111+
PLATFORM: ${{ env.PLATFORM }}
112+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
126113

127114
- name: Download ipa and extract it
128115
run: |
@@ -158,9 +145,12 @@ jobs:
158145
- name: Run the iOS tests​​ (all device counts)
159146
env:
160147
DEVICES_PER_TEST_COUNT: 4
148+
_TESTING: ${{ env._TESTING }}
149+
PRINT_FAILED_TEST_LOGS: ${{ env.PRINT_FAILED_TEST_LOGS }}
150+
PRINT_ONGOING_TEST_LOGS: ${{ env.PRINT_ONGOING_TEST_LOGS }}
161151
run: |
162152
pwd
163-
_TESTING=${{ github.event.inputs.HIDE_WEBDRIVER_LOGS }} npx playwright test --grep "(?=.*@${PLATFORM})(?=.*@${{ github.event.inputs.RISK }})" #Note: this has to be double quotes
153+
npx playwright test --grep "(?=.*@${PLATFORM})(?=.*@${{ github.event.inputs.RISK }})" #Note: this has to be double quotes
164154
165155
- name: Generate and publish test report
166156
uses: ./github/actions/generate-publish-test-report

run/localizer/constants.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,19 @@ export enum LOCALE_DEFAULTS {
99
token_name_short = 'SESH',
1010
usd_name_short = 'USD',
1111
app_pro = 'Session Pro',
12+
session_foundation = 'Session Foundation',
13+
pro = 'Pro',
1214
}
1315

1416
export const rtlLocales = ['ar', 'fa', 'he', 'ps', 'ur'];
1517

16-
export const crowdinLocales = ['en'] as const;
18+
export const crowdinLocales = [
19+
'en',
20+
] as const;
1721

1822
export type CrowdinLocale = (typeof crowdinLocales)[number];
1923

2024
export function isCrowdinLocale(locale: string): locale is CrowdinLocale {
2125
return crowdinLocales.includes(locale as CrowdinLocale);
2226
}
27+

0 commit comments

Comments
 (0)