Skip to content

Commit 4ce0268

Browse files
committed
Merge remote-tracking branch 'upstream/main' into JKobrynski/fix/56609-display-name-missing
2 parents 982c6d4 + 23fa95c commit 4ce0268

File tree

220 files changed

+3847
-2289
lines changed

Some content is hidden

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

220 files changed

+3847
-2289
lines changed

.github/actions/javascript/postTestBuildComment/action.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,36 @@ inputs:
1313
ANDROID:
1414
description: "Android job result ('success', 'failure', 'cancelled', or 'skipped')"
1515
required: false
16+
ANDROID_HYBRID:
17+
description: "Android Hybrid job result ('success', 'failure', 'cancelled', or 'skipped')"
18+
required: false
1619
DESKTOP:
1720
description: "Desktop job result ('success', 'failure', 'cancelled', or 'skipped')"
1821
required: false
1922
IOS:
2023
description: "iOS job result ('success', 'failure', 'cancelled', or 'skipped')"
2124
required: false
25+
IOS_Hybrid:
26+
description: "iOS Hybrid job result ('success', 'failure', 'cancelled', or 'skipped')"
27+
required: false
2228
WEB:
2329
description: "Web job result ('success', 'failure', 'cancelled', or 'skipped')"
2430
required: false
2531
ANDROID_LINK:
2632
description: "Link for the Android build"
2733
required: false
34+
ANDROID_HYBRID_LINK:
35+
description: "Link for the Android Hybrid build"
36+
required: false
2837
DESKTOP_LINK:
2938
description: "Link for the desktop build"
3039
required: false
3140
IOS_LINK:
3241
description: "Link for the iOS build"
3342
required: false
43+
IOS_HYBRID_LINK:
44+
description: "Link for the iOS Hybrid build"
45+
required: false
3446
WEB_LINK:
3547
description: "Link for the web build"
3648
required: false

.github/actions/javascript/postTestBuildComment/index.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11502,12 +11502,14 @@ const github_1 = __nccwpck_require__(5438);
1150211502
const CONST_1 = __importDefault(__nccwpck_require__(9873));
1150311503
const GithubUtils_1 = __importDefault(__nccwpck_require__(9296));
1150411504
function getTestBuildMessage() {
11505-
const inputs = ['ANDROID', 'DESKTOP', 'IOS', 'WEB'];
11505+
const inputs = ['ANDROID', 'ANDROID_HYBRID', 'DESKTOP', 'IOS', 'IOS_HYBRID', 'WEB'];
1150611506
const names = {
1150711507
[inputs[0]]: 'Android',
11508-
[inputs[1]]: 'Desktop',
11509-
[inputs[2]]: 'iOS',
11510-
[inputs[3]]: 'Web',
11508+
[inputs[1]]: 'Android Hybrid',
11509+
[inputs[2]]: 'Desktop',
11510+
[inputs[3]]: 'iOS',
11511+
[inputs[4]]: 'iOS Hybrid',
11512+
[inputs[5]]: 'Web',
1151111513
};
1151211514
const result = inputs.reduce((acc, platform) => {
1151311515
const input = core.getInput(platform, { required: false });
@@ -11531,6 +11533,9 @@ function getTestBuildMessage() {
1153111533
| ------------- | ------------- |
1153211534
| ${result.ANDROID.link} | ${result.IOS.link} |
1153311535
| ${result.ANDROID.qrCode} | ${result.IOS.qrCode} |
11536+
| Android Hybrid :robot::arrows_counterclockwise: | iOS Hybrid :apple::arrows_counterclockwise: |
11537+
| ${result.ANDROID_HYBRID.link} | ${result.IOS_HYBRID.link} |
11538+
| ${result.ANDROID_HYBRID.qrCode} | ${result.IOS_HYBRID.qrCode} |
1153411539
| Desktop :computer: | Web :spider_web: |
1153511540
| ${result.DESKTOP.link} | ${result.WEB.link} |
1153611541
| ${result.DESKTOP.qrCode} | ${result.WEB.qrCode} |

.github/actions/javascript/postTestBuildComment/postTestBuildComment.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ import CONST from '@github/libs/CONST';
55
import GithubUtils from '@github/libs/GithubUtils';
66

77
function getTestBuildMessage(): string {
8-
const inputs = ['ANDROID', 'DESKTOP', 'IOS', 'WEB'] as const;
8+
const inputs = ['ANDROID', 'ANDROID_HYBRID', 'DESKTOP', 'IOS', 'IOS_HYBRID', 'WEB'] as const;
99
const names = {
1010
[inputs[0]]: 'Android',
11-
[inputs[1]]: 'Desktop',
12-
[inputs[2]]: 'iOS',
13-
[inputs[3]]: 'Web',
11+
[inputs[1]]: 'Android Hybrid',
12+
[inputs[2]]: 'Desktop',
13+
[inputs[3]]: 'iOS',
14+
[inputs[4]]: 'iOS Hybrid',
15+
[inputs[5]]: 'Web',
1416
};
1517

1618
const result = inputs.reduce((acc, platform) => {
@@ -40,6 +42,9 @@ function getTestBuildMessage(): string {
4042
| ------------- | ------------- |
4143
| ${result.ANDROID.link} | ${result.IOS.link} |
4244
| ${result.ANDROID.qrCode} | ${result.IOS.qrCode} |
45+
| Android Hybrid :robot::arrows_counterclockwise: | iOS Hybrid :apple::arrows_counterclockwise: |
46+
| ${result.ANDROID_HYBRID.link} | ${result.IOS_HYBRID.link} |
47+
| ${result.ANDROID_HYBRID.qrCode} | ${result.IOS_HYBRID.qrCode} |
4348
| Desktop :computer: | Web :spider_web: |
4449
| ${result.DESKTOP.link} | ${result.WEB.link} |
4550
| ${result.DESKTOP.qrCode} | ${result.WEB.qrCode} |

.github/workflows/testBuild.yml

Lines changed: 51 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,42 @@ on:
66
PULL_REQUEST_NUMBER:
77
description: Pull Request number for correct placement of apps
88
required: true
9-
pull_request_target:
10-
types: [opened, synchronize, labeled]
11-
branches: ['*ci-test/**']
9+
WEB:
10+
description: Should build web app?
11+
type: boolean
12+
default: true
13+
DESKTOP:
14+
description: Should build desktop app?
15+
type: boolean
16+
default: true
17+
IOS:
18+
description: Should build iOS app?
19+
type: boolean
20+
default: true
21+
IOS_HYBRID:
22+
description: Should build iOS hybrid app?
23+
type: boolean
24+
default: true
25+
ANDROID:
26+
description: Should build android app?
27+
type: boolean
28+
default: true
29+
ANDROID_HYBRID:
30+
description: Should build android hybrid app?
31+
type: boolean
32+
default: true
1233

1334
env:
14-
PULL_REQUEST_NUMBER: ${{ github.event.number || github.event.inputs.PULL_REQUEST_NUMBER }}
35+
# This variable is needed for fastlane to construct correct path
36+
PULL_REQUEST_NUMBER: ${{ github.event.inputs.PULL_REQUEST_NUMBER }}
1537

1638
jobs:
1739
prep:
1840
runs-on: ubuntu-latest
1941
outputs:
20-
REF: ${{ github.event.pull_request.head.sha || steps.getHeadRef.outputs.REF }}
21-
READY_TO_BUILD: ${{ steps.readyToBuild.outputs.READY_TO_BUILD }}
42+
REF: ${{ steps.getHeadRef.outputs.REF }}
2243
steps:
2344
- name: Checkout
24-
if: ${{ github.event_name == 'workflow_dispatch' }}
2545
uses: actions/checkout@v4
2646

2747
- name: Validate that user is an Expensify employee
@@ -30,21 +50,6 @@ jobs:
3050
REQUIRE_APP_DEPLOYER: false
3151
OS_BOTIFY_TOKEN: ${{ secrets.OS_BOTIFY_COMMIT_TOKEN }}
3252

33-
- name: Check if PR has Ready to Build label
34-
id: readyToBuild
35-
run: |
36-
LABELS=$(gh pr view "${{ env.PULL_REQUEST_NUMBER }}" --repo Expensify/App --json labels --jq '.labels[].name')
37-
if echo "$LABELS" | grep -q 'Ready To Build'; then
38-
echo "::notice::✅ PR ${{ env.PULL_REQUEST_NUMBER }} has 'Ready to Build' label"
39-
echo "READY_TO_BUILD=true" >> "$GITHUB_OUTPUT"
40-
else
41-
echo "::error::❌ PR ${{ env.PULL_REQUEST_NUMBER }} does not have 'Ready to Build' label"
42-
echo "READY_TO_BUILD=false" >> "$GITHUB_OUTPUT"
43-
exit 1
44-
fi
45-
env:
46-
GITHUB_TOKEN: ${{ github.token }}
47-
4853
- name: Check if pull request number is correct
4954
if: ${{ github.event_name == 'workflow_dispatch' }}
5055
id: getHeadRef
@@ -64,13 +69,14 @@ jobs:
6469

6570
buildAndroid:
6671
name: Build Android app for testing
72+
if: ${{ inputs.ANDROID }}
6773
uses: ./.github/workflows/buildAndroid.yml
6874
needs: [prep]
6975
secrets: inherit
7076
with:
7177
type: adhoc
7278
ref: ${{ needs.prep.outputs.REF }}
73-
pull_request_number: ${{ github.event.number || github.event.inputs.PULL_REQUEST_NUMBER }}
79+
pull_request_number: ${{ github.event.inputs.PULL_REQUEST_NUMBER }}
7480

7581
uploadAndroid:
7682
name: Upload Android app to S3
@@ -118,6 +124,7 @@ jobs:
118124
119125
iOS:
120126
name: Build and deploy iOS for testing
127+
if: ${{ inputs.IOS }}
121128
needs: [prep]
122129
env:
123130
DEVELOPER_DIR: /Applications/Xcode_16.2.0.app/Contents/Developer
@@ -206,6 +213,7 @@ jobs:
206213

207214
desktop:
208215
name: Build and deploy Desktop for testing
216+
if: ${{ inputs.DESKTOP }}
209217
needs: [prep]
210218
runs-on: macos-14-large
211219
steps:
@@ -256,6 +264,7 @@ jobs:
256264

257265
web:
258266
name: Build and deploy Web
267+
if: ${{ inputs.WEB }}
259268
needs: [prep]
260269
runs-on: ubuntu-latest-xl
261270
steps:
@@ -286,11 +295,21 @@ jobs:
286295
- name: Deploy to S3 for internal testing
287296
run: aws s3 cp --recursive --acl public-read "$GITHUB_WORKSPACE"/dist s3://ad-hoc-expensify-cash/web/"$PULL_REQUEST_NUMBER"
288297

298+
buildHybridApps:
299+
name: Build hybrid adhoc apps
300+
uses: ./.github/workflows/testBuildHybrid.yml
301+
needs: [prep]
302+
secrets: inherit
303+
with:
304+
APP_REF: ${{ needs.prep.outputs.REF }}
305+
IOS_HYBRID: ${{ inputs.IOS_HYBRID }}
306+
ANDROID_HYBRID: ${{ inputs.ANDROID_HYBRID }}
307+
289308
postGithubComment:
290309
runs-on: ubuntu-latest
310+
if: always()
291311
name: Post a GitHub comment with app download links for testing
292-
needs: [prep, uploadAndroid, iOS, desktop, web]
293-
if: ${{ always() && needs.prep.outputs.READY_TO_BUILD == 'true' }}
312+
needs: [prep, uploadAndroid, iOS, desktop, web, buildHybridApps]
294313
steps:
295314
- name: Checkout
296315
uses: actions/checkout@v4
@@ -314,13 +333,17 @@ jobs:
314333
- name: Publish links to apps for download
315334
uses: ./.github/actions/javascript/postTestBuildComment
316335
with:
317-
PR_NUMBER: ${{ env.PULL_REQUEST_NUMBER }}
336+
PR_NUMBER: ${{ github.event.inputs.PULL_REQUEST_NUMBER }}
318337
GITHUB_TOKEN: ${{ github.token }}
319338
ANDROID: ${{ needs.uploadAndroid.result }}
339+
ANDROID_HYBRID: ${{ needs.buildHybridApps.result }}
320340
DESKTOP: ${{ needs.desktop.result }}
321341
IOS: ${{ needs.iOS.result }}
342+
IOS_HYBRID: ${{ needs.buildHybridApps.result }}
322343
WEB: ${{ needs.web.result }}
323344
ANDROID_LINK: ${{ needs.uploadAndroid.outputs.S3_APK_PATH }}
324-
DESKTOP_LINK: https://ad-hoc-expensify-cash.s3.amazonaws.com/desktop/${{ env.PULL_REQUEST_NUMBER }}/NewExpensify.dmg
345+
ANDROID_HYBRID_LINK: ${{ needs.buildHybridApps.outputs.ANDROID_LINK }}
346+
DESKTOP_LINK: https://ad-hoc-expensify-cash.s3.amazonaws.com/desktop/${{ github.event.inputs.PULL_REQUEST_NUMBER }}/NewExpensify.dmg
325347
IOS_LINK: ${{ steps.get_ios_path.outputs.ios_path }}
326-
WEB_LINK: https://${{ env.PULL_REQUEST_NUMBER }}.pr-testing.expensify.com
348+
IOS_HYBRID_LINK: ${{ needs.buildHybridApps.outputs.IOS_LINK }}
349+
WEB_LINK: https://${{ github.event.inputs.PULL_REQUEST_NUMBER }}.pr-testing.expensify.com

.github/workflows/testBuildHybrid.yml

Lines changed: 45 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,27 @@ on:
1111
description: Pull Request number from Mobile-Expensify repo for correct placement of OD app. It will take precedence over MOBILE-EXPENSIFY from App's PR description if both specified. If nothing is specified defaults to Mobile-Expensify's main
1212
required: false
1313
default: ''
14+
workflow_call:
15+
inputs:
16+
APP_REF:
17+
description: Git ref to checkout in App
18+
type: string
19+
required: true
20+
IOS_HYBRID:
21+
description: Should build iOS app?
22+
type: boolean
23+
default: true
24+
ANDROID_HYBRID:
25+
description: Should build Android app?
26+
type: boolean
27+
default: true
28+
29+
outputs:
30+
ANDROID_LINK:
31+
value: ${{ jobs.androidHybrid.outputs.S3_APK_PATH }}
32+
IOS_LINK:
33+
value: ${{ jobs.iosHybrid.outputs.IOS_PATH }}
34+
1435

1536
env:
1637
# This variable is needed for fastlane to construct correct path
@@ -24,12 +45,14 @@ jobs:
2445
uses: actions/checkout@v4
2546

2647
- name: Validate that user is an Expensify employee
48+
if: github.event_name == 'workflow_dispatch'
2749
uses: ./.github/actions/composite/validateActor
2850
with:
2951
REQUIRE_APP_DEPLOYER: false
3052
OS_BOTIFY_TOKEN: ${{ secrets.OS_BOTIFY_COMMIT_TOKEN }}
3153

3254
- name: Validate input
55+
if: github.event_name == 'workflow_dispatch'
3356
run: |
3457
if [[ -z "${{ github.event.inputs.APP_PULL_REQUEST_NUMBER }}" && -z "${{ github.event.inputs.HYBRIDAPP_PULL_REQUEST_NUMBER }}" ]]; then
3558
echo "Invalid input. You have to pass at least one PR number"
@@ -49,6 +72,12 @@ jobs:
4972
id: getHeadRef
5073
run: |
5174
set -e
75+
76+
if [[ "${{ github.event_name }}" == "workflow_call " ]]; then
77+
echo "REF=${{ inputs.APP_REF }}" >> "$GITHUB_OUTPUT"
78+
exit 0
79+
fi
80+
5281
if [[ -z "${{ github.event.inputs.APP_PULL_REQUEST_NUMBER }}" ]]; then
5382
echo "REF=" >> "$GITHUB_OUTPUT"
5483
else
@@ -120,6 +149,7 @@ jobs:
120149

121150
androidHybrid:
122151
name: Build Android HybridApp
152+
if: ${{ github.event_name == 'workflow_dispatch' || inputs.ANDROID_HYBRID }}
123153
needs: [getNewDotRef, getOldDotPR, getOldDotRef]
124154
runs-on: ubuntu-latest-xl
125155
outputs:
@@ -235,10 +265,13 @@ jobs:
235265
236266
iosHybrid:
237267
name: Build and deploy iOS for testing
268+
if: ${{ github.event_name == 'workflow_dispatch' || inputs.IOS_HYBRID }}
238269
needs: [getNewDotRef, getOldDotPR, getOldDotRef]
239270
env:
240271
DEVELOPER_DIR: /Applications/Xcode_16.2.0.app/Contents/Developer
241272
runs-on: macos-15-xlarge
273+
outputs:
274+
IOS_PATH: ${{ steps.export-ios-path.outputs.IOS_PATH }}
242275
steps:
243276
- name: Checkout
244277
uses: actions/checkout@v4
@@ -336,36 +369,27 @@ jobs:
336369
S3_BUCKET: ad-hoc-expensify-cash
337370
S3_REGION: us-east-1
338371

339-
- name: Upload Artifact
340-
uses: actions/upload-artifact@v4
341-
with:
342-
name: ios
343-
path: ./ios_paths.json
372+
- name: Export iOS path
373+
id: export-ios-path
374+
run: |
375+
content_ios="$(cat ./ios_paths.json)"
376+
content_ios="${content_ios//'%'/'%25'}"
377+
content_ios="${content_ios//$'\n'/'%0A'}"
378+
content_ios="${content_ios//$'\r'/'%0D'}"
379+
ios_path=$(echo "$content_ios" | jq -r '.html_path')
380+
echo "IOS_PATH=$ios_path" >> "$GITHUB_OUTPUT"
344381
345382
postGithubComment:
346383
runs-on: ubuntu-latest
347384
name: Post a GitHub comment with app download links for testing
385+
if: github.event_name == 'workflow_dispatch'
348386
needs: [getNewDotRef, getOldDotPR, androidHybrid, iosHybrid]
349387
steps:
350388
- name: Checkout
351389
uses: actions/checkout@v4
352390
with:
353391
ref: ${{ needs.getNewDotRef.outputs.REF }}
354392

355-
- name: Download Artifact
356-
uses: actions/download-artifact@v4
357-
358-
- name: Read JSONs with iOS paths
359-
id: get_ios_path
360-
if: ${{ needs.iosHybrid.result == 'success' }}
361-
run: |
362-
content_ios="$(cat ./ios/ios_paths.json)"
363-
content_ios="${content_ios//'%'/'%25'}"
364-
content_ios="${content_ios//$'\n'/'%0A'}"
365-
content_ios="${content_ios//$'\r'/'%0D'}"
366-
ios_path=$(echo "$content_ios" | jq -r '.html_path')
367-
echo "ios_path=$ios_path" >> "$GITHUB_OUTPUT"
368-
369393
- name: Publish links to apps for download on NewDot PR
370394
if: github.event.inputs.APP_PULL_REQUEST_NUMBER != ''
371395
uses: ./.github/actions/javascript/postTestBuildComment
@@ -376,7 +400,7 @@ jobs:
376400
ANDROID: ${{ needs.androidHybrid.result }}
377401
IOS: ${{ needs.iosHybrid.result }}
378402
ANDROID_LINK: ${{ needs.androidHybrid.outputs.S3_APK_PATH }}
379-
IOS_LINK: ${{ steps.get_ios_path.outputs.ios_path }}
403+
IOS_LINK: ${{ needs.iosHybrid.outputs.IOS_PATH }}
380404

381405
- name: Publish links to apps for download on OldDot PR
382406
if: needs.getOldDotPR.outputs.OLD_DOT_PR != ''
@@ -388,4 +412,4 @@ jobs:
388412
ANDROID: ${{ needs.androidHybrid.result }}
389413
IOS: ${{ needs.iosHybrid.result }}
390414
ANDROID_LINK: ${{ needs.androidHybrid.outputs.S3_APK_PATH }}
391-
IOS_LINK: ${{ steps.get_ios_path.outputs.ios_path }}
415+
IOS_LINK: ${{ needs.iosHybrid.outputs.IOS_PATH }}

Mobile-Expensify

0 commit comments

Comments
 (0)