Skip to content

Commit 3c54095

Browse files
committed
Merge remote-tracking branch 'upstream/main' into fix-Report_fields_deleteAll_list
2 parents 53fdbdb + 2e2c2bf commit 3c54095

File tree

445 files changed

+11636
-7916
lines changed

Some content is hidden

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

445 files changed

+11636
-7916
lines changed

.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ docs/vendor/**
1010
docs/assets/**
1111
web/gtm.js
1212
**/.expo/**
13+
src/libs/SearchParser/searchParser.js

.github/actions/composite/buildAndroidE2EAPK/action.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ runs:
5353
distribution: "oracle"
5454
java-version: "17"
5555

56-
- uses: ruby/setup-ruby@a05e47355e80e57b9a67566a813648fa67d92011
56+
- uses: ruby/setup-ruby@v1.187.0
5757
with:
5858
ruby-version: "2.7"
5959
bundler-cache: true
@@ -74,7 +74,7 @@ runs:
7474
shell: bash
7575

7676
- name: Upload APK
77-
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
77+
uses: actions/upload-artifact@v4
7878
with:
7979
name: ${{ inputs.ARTIFACT_NAME }}
8080
path: ${{ inputs.APP_OUTPUT_PATH }}

.github/scripts/createDocsRoutes.ts

+11-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import type {ValueOf} from 'type-fest';
55
type Article = {
66
href: string;
77
title: string;
8+
order?: number;
89
};
910

1011
type Section = {
@@ -60,11 +61,12 @@ function toTitleCase(str: string): string {
6061
/**
6162
* @param filename - The name of the file
6263
*/
63-
function getArticleObj(filename: string): Article {
64+
function getArticleObj(filename: string, order?: number): Article {
6465
const href = filename.replace('.md', '');
6566
return {
6667
href,
6768
title: toTitleCase(href.replaceAll('-', ' ')),
69+
order,
6870
};
6971
}
7072

@@ -90,6 +92,12 @@ function pushOrCreateEntry<TKey extends HubEntriesKey>(hubs: Hub[], hub: string,
9092
}
9193
}
9294

95+
function getOrderFromArticleFrontMatter(path: string): number | undefined {
96+
const frontmatter = fs.readFileSync(path, 'utf8').split('---')[1];
97+
const frontmatterObject = yaml.load(frontmatter) as Record<string, unknown>;
98+
return frontmatterObject.order as number | undefined;
99+
}
100+
93101
/**
94102
* Add articles and sections to hubs
95103
* @param hubs - The hubs inside docs/articles/ for a platform
@@ -113,7 +121,8 @@ function createHubsWithArticles(hubs: string[], platformName: ValueOf<typeof pla
113121

114122
// Each subfolder will be a section containing articles
115123
fs.readdirSync(`${docsDir}/articles/${platformName}/${hub}/${section}`).forEach((subArticle) => {
116-
articles.push(getArticleObj(subArticle));
124+
const order = getOrderFromArticleFrontMatter(`${docsDir}/articles/${platformName}/${hub}/${section}/${subArticle}`);
125+
articles.push(getArticleObj(subArticle, order));
117126
});
118127

119128
pushOrCreateEntry(routeHubs, hub, 'sections', {

.github/workflows/e2ePerformanceTests.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ jobs:
156156
run: mkdir zip
157157

158158
- name: Download baseline APK
159-
uses: actions/download-artifact@348754975ef0295bfa2c111cba996120cfdf8a5d
159+
uses: actions/download-artifact@v4
160160
id: downloadBaselineAPK
161161
with:
162162
name: baseline-apk-${{ needs.buildBaseline.outputs.VERSION }}
@@ -170,7 +170,7 @@ jobs:
170170
run: mv "${{steps.downloadBaselineAPK.outputs.download-path}}/app-e2e-release.apk" "${{steps.downloadBaselineAPK.outputs.download-path}}/app-e2eRelease.apk"
171171

172172
- name: Download delta APK
173-
uses: actions/download-artifact@348754975ef0295bfa2c111cba996120cfdf8a5d
173+
uses: actions/download-artifact@v4
174174
id: downloadDeltaAPK
175175
with:
176176
name: delta-apk-${{ needs.buildDelta.outputs.DELTA_REF }}
@@ -184,7 +184,7 @@ jobs:
184184

185185
- name: Copy e2e code into zip folder
186186
run: cp tests/e2e/dist/index.js zip/testRunner.ts
187-
187+
188188
- name: Copy profiler binaries into zip folder
189189
run: cp -r node_modules/@perf-profiler/android/cpp-profiler/bin zip/bin
190190

@@ -257,12 +257,12 @@ jobs:
257257
- name: Check if test failed, if so post the results and add the DeployBlocker label
258258
id: checkIfRegressionDetected
259259
run: |
260-
if grep -q '🔴' ./output.md; then
260+
if grep -q '🔴' "./Host_Machine_Files/\$WORKING_DIRECTORY/output.md"; then
261261
# Create an output to the GH action that the test failed:
262262
echo "performanceRegressionDetected=true" >> "$GITHUB_OUTPUT"
263263
264264
gh pr edit ${{ inputs.PR_NUMBER }} --add-label DeployBlockerCash
265-
gh pr comment ${{ inputs.PR_NUMBER }} -F ./output.md
265+
gh pr comment ${{ inputs.PR_NUMBER }} -F "./Host_Machine_Files/\$WORKING_DIRECTORY/output.md"
266266
gh pr comment ${{ inputs.PR_NUMBER }} -b "@Expensify/mobile-deployers 📣 Please look into this performance regression as it's a deploy blocker."
267267
else
268268
echo "performanceRegressionDetected=false" >> "$GITHUB_OUTPUT"

.github/workflows/platformDeploy.yml

+71-70
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
java-version: '17'
6363

6464
- name: Setup Ruby
65-
uses: ruby/setup-ruby@a05e47355e80e57b9a67566a813648fa67d92011
65+
uses: ruby/setup-ruby@v1.187.0
6666
with:
6767
ruby-version: '2.7'
6868
bundler-cache: true
@@ -80,38 +80,42 @@ jobs:
8080
- name: Set version in ENV
8181
run: echo "VERSION_CODE=$(grep -o 'versionCode\s\+[0-9]\+' android/app/build.gradle | awk '{ print $2 }')" >> "$GITHUB_ENV"
8282

83-
- name: Run Fastlane beta
84-
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
85-
run: bundle exec fastlane android beta
83+
- name: Run Fastlane
84+
run: bundle exec fastlane android ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) && 'production' || 'beta' }}
8685
env:
86+
RUBYOPT: '-rostruct'
8787
MYAPP_UPLOAD_STORE_PASSWORD: ${{ secrets.MYAPP_UPLOAD_STORE_PASSWORD }}
8888
MYAPP_UPLOAD_KEY_PASSWORD: ${{ secrets.MYAPP_UPLOAD_KEY_PASSWORD }}
89-
90-
- name: Run Fastlane production
91-
if: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
92-
run: bundle exec fastlane android production
93-
env:
9489
VERSION: ${{ env.VERSION_CODE }}
9590

9691
- name: Archive Android sourcemaps
97-
uses: actions/upload-artifact@v3
92+
uses: actions/upload-artifact@v4
9893
with:
9994
name: android-sourcemap-${{ github.ref_name }}
10095
path: android/app/build/generated/sourcemaps/react/productionRelease/index.android.bundle.map
10196

102-
- name: Upload Android version to GitHub artifacts
97+
- name: Upload Android build to GitHub artifacts
10398
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
104-
uses: actions/upload-artifact@v3
99+
uses: actions/upload-artifact@v4
105100
with:
106101
name: app-production-release.aab
107102
path: android/app/build/outputs/bundle/productionRelease/app-production-release.aab
108103

109-
- name: Upload Android version to Browser Stack
104+
- name: Upload Android build to Browser Stack
110105
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
111106
run: curl -u "$BROWSERSTACK" -X POST "https://api-cloud.browserstack.com/app-live/upload" -F "file=@./android/app/build/outputs/bundle/productionRelease/app-production-release.aab"
112107
env:
113108
BROWSERSTACK: ${{ secrets.BROWSERSTACK }}
114109

110+
- name: Upload Android build to GitHub Release
111+
if: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
112+
run: |
113+
RUN_ID="$(gh run list --workflow platformDeploy.yml --event push --branch ${{ github.event.release.tag_name }} --json databaseId --jq '.[0].databaseId')"
114+
gh run download "$RUN_ID" --name app-production-release.aab
115+
gh release upload ${{ github.event.release.tag_name }} app-production-release.aab
116+
env:
117+
GITHUB_TOKEN: ${{ github.token }}
118+
115119
- name: Warn deployers if Android production deploy failed
116120
if: ${{ failure() && fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
117121
uses: 8398a7/action-slack@v3
@@ -147,9 +151,13 @@ jobs:
147151
env:
148152
DEVELOPER_ID_SECRET_PASSPHRASE: ${{ secrets.DEVELOPER_ID_SECRET_PASSPHRASE }}
149153

150-
- name: Build production desktop app
151-
if: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
152-
run: npm run desktop-build
154+
- name: Build desktop app
155+
run: |
156+
if [[ ${{ env.SHOULD_DEPLOY_PRODUCTION }} == 'true' ]]; then
157+
npm run desktop-build
158+
else
159+
npm run desktop-build-staging
160+
fi
153161
env:
154162
CSC_LINK: ${{ secrets.CSC_LINK }}
155163
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
@@ -159,18 +167,17 @@ jobs:
159167
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
160168
GCP_GEOLOCATION_API_KEY: $${{ secrets.GCP_GEOLOCATION_API_KEY_PRODUCTION }}
161169

170+
- name: Upload desktop build to GitHub Workflow
171+
uses: actions/upload-artifact@v4
172+
with:
173+
name: NewExpensify.dmg
174+
path: desktop-build/NewExpensify.dmg
162175

163-
- name: Build staging desktop app
164-
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
165-
run: npm run desktop-build-staging
176+
- name: Upload desktop build to GitHub Release
177+
if: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
178+
run: gh release upload ${{ github.event.release.tag_name }} desktop-build/NewExpensify.dmg
166179
env:
167-
CSC_LINK: ${{ secrets.CSC_LINK }}
168-
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
169-
APPLE_ID: ${{ secrets.APPLE_ID }}
170-
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
171-
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
172-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
173-
GCP_GEOLOCATION_API_KEY: $${{ secrets.GCP_GEOLOCATION_API_KEY_STAGING }}
180+
GITHUB_TOKEN: ${{ github.token }}
174181

175182
iOS:
176183
name: Build and deploy iOS
@@ -191,7 +198,7 @@ jobs:
191198
uses: ./.github/actions/composite/setupNode
192199

193200
- name: Setup Ruby
194-
uses: ruby/setup-ruby@a05e47355e80e57b9a67566a813648fa67d92011
201+
uses: ruby/setup-ruby@v1.187.0
195202
with:
196203
ruby-version: '2.7'
197204
bundler-cache: true
@@ -236,43 +243,45 @@ jobs:
236243
env:
237244
LARGE_SECRET_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }}
238245

246+
- name: Set iOS version in ENV
247+
run: echo "IOS_VERSION=$(echo '${{ github.event.release.tag_name }}' | tr '-' '.')" >> "$GITHUB_ENV"
248+
239249
- name: Run Fastlane
240-
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
241-
run: bundle exec fastlane ios beta
250+
run: bundle exec fastlane ios ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) && 'production' || 'beta' }}
242251
env:
243252
APPLE_CONTACT_EMAIL: ${{ secrets.APPLE_CONTACT_EMAIL }}
244253
APPLE_CONTACT_PHONE: ${{ secrets.APPLE_CONTACT_PHONE }}
245254
APPLE_DEMO_EMAIL: ${{ secrets.APPLE_DEMO_EMAIL }}
246255
APPLE_DEMO_PASSWORD: ${{ secrets.APPLE_DEMO_PASSWORD }}
256+
VERSION: ${{ env.IOS_VERSION }}
247257

248258
- name: Archive iOS sourcemaps
249-
uses: actions/upload-artifact@v3
259+
uses: actions/upload-artifact@v4
250260
with:
251261
name: ios-sourcemap-${{ github.ref_name }}
252262
path: main.jsbundle.map
253263

254-
- name: Upload iOS version to GitHub artifacts
264+
- name: Upload iOS build to GitHub artifacts
255265
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
256-
uses: actions/upload-artifact@v3
266+
uses: actions/upload-artifact@v4
257267
with:
258268
name: New Expensify.ipa
259269
path: /Users/runner/work/App/App/New Expensify.ipa
260270

261-
- name: Upload iOS version to Browser Stack
271+
- name: Upload iOS build to Browser Stack
262272
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
263273
run: curl -u "$BROWSERSTACK" -X POST "https://api-cloud.browserstack.com/app-live/upload" -F "file=@/Users/runner/work/App/App/New Expensify.ipa"
264274
env:
265275
BROWSERSTACK: ${{ secrets.BROWSERSTACK }}
266276

267-
- name: Set iOS version in ENV
268-
if: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
269-
run: echo "IOS_VERSION=$(echo '${{ github.event.release.tag_name }}' | tr '-' '.')" >> "$GITHUB_ENV"
270-
271-
- name: Run Fastlane for App Store release
277+
- name: Upload iOS build to GitHub Release
272278
if: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
273-
run: bundle exec fastlane ios production
279+
run: |
280+
RUN_ID="$(gh run list --workflow platformDeploy.yml --event push --branch ${{ github.event.release.tag_name }} --json databaseId --jq '.[0].databaseId')"
281+
gh run download "$RUN_ID" --name 'New Expensify.ipa'
282+
gh release upload ${{ github.event.release.tag_name }} 'New Expensify.ipa'
274283
env:
275-
VERSION: ${{ env.IOS_VERSION }}
284+
GITHUB_TOKEN: ${{ github.token }}
276285

277286
- name: Warn deployers if iOS production deploy failed
278287
if: ${{ failure() && fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
@@ -314,41 +323,33 @@ jobs:
314323
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
315324
aws-region: us-east-1
316325

317-
- name: Build web for production
318-
if: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
319-
run: npm run build
320-
321-
- name: Build web for staging
322-
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
323-
run: npm run build-staging
324-
325-
- name: Build storybook docs for production
326-
if: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
327-
run: npm run storybook-build
328-
continue-on-error: true
326+
- name: Build web
327+
run: |
328+
if [[ ${{ env.SHOULD_DEPLOY_PRODUCTION }} == 'true' ]]; then
329+
npm run build
330+
else
331+
npm run build-staging
332+
fi
329333
330-
- name: Build storybook docs for staging
331-
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
332-
run: npm run storybook-build-staging
334+
- name: Build storybook docs
333335
continue-on-error: true
336+
run: |
337+
if [[ ${{ env.SHOULD_DEPLOY_PRODUCTION }} == 'true' ]]; then
338+
npm run storybook-build
339+
else
340+
npm run storybook-build-staging
341+
fi
334342
335-
- name: Deploy production to S3
336-
if: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
337-
run: aws s3 cp --recursive --acl public-read "$GITHUB_WORKSPACE"/dist s3://expensify-cash/ && aws s3 cp --acl public-read --content-type 'application/json' --metadata-directive REPLACE s3://expensify-cash/.well-known/apple-app-site-association s3://expensify-cash/.well-known/apple-app-site-association && aws s3 cp --acl public-read --content-type 'application/json' --metadata-directive REPLACE s3://expensify-cash/.well-known/apple-app-site-association s3://expensify-cash/apple-app-site-association
338-
339-
- name: Deploy staging to S3
340-
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
341-
run: aws s3 cp --recursive --acl public-read "$GITHUB_WORKSPACE"/dist s3://staging-expensify-cash/ && aws s3 cp --acl public-read --content-type 'application/json' --metadata-directive REPLACE s3://staging-expensify-cash/.well-known/apple-app-site-association s3://staging-expensify-cash/.well-known/apple-app-site-association && aws s3 cp --acl public-read --content-type 'application/json' --metadata-directive REPLACE s3://staging-expensify-cash/.well-known/apple-app-site-association s3://staging-expensify-cash/apple-app-site-association
342-
343-
- name: Purge production Cloudflare cache
344-
if: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
345-
run: /home/runner/.local/bin/cli4 --verbose --delete hosts=["new.expensify.com"] /zones/:9ee042e6cfc7fd45e74aa7d2f78d617b/purge_cache
343+
- name: Deploy to S3
344+
run: |
345+
aws s3 cp --recursive --acl public-read "$GITHUB_WORKSPACE"/dist ${{ env.S3_URL }}/
346+
aws s3 cp --acl public-read --content-type 'application/json' --metadata-directive REPLACE ${{ env.S3_URL }}/.well-known/apple-app-site-association ${{ env.S3_URL }}/.well-known/apple-app-site-association
347+
aws s3 cp --acl public-read --content-type 'application/json' --metadata-directive REPLACE ${{ env.S3_URL }}/.well-known/apple-app-site-association ${{env.S3_URL }}/apple-app-site-association
346348
env:
347-
CF_API_KEY: ${{ secrets.CLOUDFLARE_TOKEN }}
349+
S3_URL: s3://${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) && '' || 'staging-' }}expensify-cash
348350

349-
- name: Purge staging Cloudflare cache
350-
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
351-
run: /home/runner/.local/bin/cli4 --verbose --delete hosts=["staging.new.expensify.com"] /zones/:9ee042e6cfc7fd45e74aa7d2f78d617b/purge_cache
351+
- name: Purge Cloudflare cache
352+
run: /home/runner/.local/bin/cli4 --verbose --delete hosts=["${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) && '' || 'staging.' }}new.expensify.com"] /zones/:9ee042e6cfc7fd45e74aa7d2f78d617b/purge_cache
352353
env:
353354
CF_API_KEY: ${{ secrets.CLOUDFLARE_TOKEN }}
354355

.github/workflows/reassurePerformanceTests.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ jobs:
4747
BASELINE_BRANCH=${BASELINE_BRANCH:="main"}
4848
git fetch origin "$BASELINE_BRANCH" --no-tags --depth=1
4949
git switch "$BASELINE_BRANCH"
50-
npm install --force
50+
npm install --force || (rm -rf node_modules && npm install --force)
5151
NODE_OPTIONS=--experimental-vm-modules npx reassure --baseline
5252
git switch --force --detach -
5353
git merge --no-commit --allow-unrelated-histories "$BASELINE_BRANCH" -X ours
5454
git checkout --ours .
55-
npm install --force
55+
npm install --force || (rm -rf node_modules && npm install --force)
5656
NODE_OPTIONS=--experimental-vm-modules npx reassure --branch
5757
5858
- name: Validate output.json

.github/workflows/sendReassurePerfData.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
shell: bash
2626
run: |
2727
set -e
28-
npx reassure --baseline
28+
NODE_OPTIONS=--experimental-vm-modules npx reassure --baseline
2929
3030
- name: Get merged pull request
3131
id: getMergedPullRequest

0 commit comments

Comments
 (0)