Skip to content

Commit

Permalink
Merge branch 'main' of github.com:margelo/expensify-app-fork into dev…
Browse files Browse the repository at this point in the history
…/perf-regression-test-configuration
  • Loading branch information
hannojg committed Dec 6, 2022
2 parents 706967e + a67b98a commit 521214d
Show file tree
Hide file tree
Showing 177 changed files with 1,540 additions and 1,570 deletions.
1 change: 0 additions & 1 deletion .env.staging
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ PUSHER_APP_KEY=268df511a204fbb60884
USE_WEB_PROXY=false
ENVIRONMENT=staging
SEND_CRASH_REPORTS=true
INLINE_RUNTIME_CHUNK=false
58 changes: 0 additions & 58 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,64 +108,6 @@ This is a checklist for PR authors. Please make sure to complete all tasks and c
- [ ] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
- [ ] I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

<details>
<summary><h4>PR Reviewer Checklist</h4>

The reviewer will copy/paste it into a new comment and complete it after the author checklist is completed
</summary>

- [ ] I have verified the author checklist is complete (all boxes are checked off).
- [ ] I verified the correct issue is linked in the `### Fixed Issues` section above
- [ ] I verified testing steps are clear and they cover the changes made in this PR
- [ ] I verified the steps for local testing are in the `Tests` section
- [ ] I verified the steps for expected offline behavior are in the `Offline steps` section
- [ ] I verified the steps for Staging and/or Production testing are in the `QA steps` section
- [ ] I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
- [ ] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
- [ ] I tested this PR with a [High Traffic account](https://github.com/Expensify/App/blob/main/contributingGuides/CONTRIBUTING.md#high-traffic-accounts) against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
- [ ] I checked that screenshots or videos are included for tests on [all platforms](https://github.com/Expensify/App/blob/main/contributingGuides/CONTRIBUTING.md#make-sure-you-can-test-on-all-platforms)
- [ ] I included screenshots or videos for tests on [all platforms](https://github.com/Expensify/App/blob/main/contributingGuides/CONTRIBUTING.md#make-sure-you-can-test-on-all-platforms)
- [ ] I verified tests pass on **all platforms** & I tested again on:
- [ ] iOS / native
- [ ] Android / native
- [ ] iOS / Safari
- [ ] Android / Chrome
- [ ] MacOS / Chrome
- [ ] MacOS / Desktop
- [ ] If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
- [ ] I verified proper code patterns were followed (see [Reviewing the code](https://github.com/Expensify/App/blob/main/contributingGuides/PR_REVIEW_GUIDELINES.md#reviewing-the-code))
- [ ] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. `toggleReport` and not `onIconClick`).
- [ ] I verified that comments were added to code that is not self explanatory
- [ ] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
- [ ] I verified any copy / text shown in the product was added in all `src/languages/*` files
- [ ] I verified any copy / text that was added to the app is correct English and approved by marketing by adding the `Waiting for Copy` label for a copy review on the original GH to get the correct copy.
- [ ] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
- [ ] I verified the JSDocs style guidelines (in [`STYLE.md`](https://github.com/Expensify/App/blob/main/contributingGuides/STYLE.md#jsdocs)) were followed
- [ ] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
- [ ] I verified that this PR follows the guidelines as stated in the [Review Guidelines](https://github.com/Expensify/App/blob/main/contributingGuides/PR_REVIEW_GUIDELINES.md)
- [ ] I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like `Avatar`, I verified the components using `Avatar` have been tested & I retested again)
- [ ] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
- [ ] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
- [ ] I verified that if a function's arguments changed that all usages have also been updated correctly
- [ ] If a new component is created I verified that:
- [ ] A similar component doesn't exist in the codebase
- [ ] All props are defined accurately and each prop has a `/** comment above it */`
- [ ] The file is named correctly
- [ ] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
- [ ] The only data being stored in the state is data necessary for rendering and nothing else
- [ ] For Class Components, any internal methods passed to components event handlers are bound to `this` properly so there are no scoping issues (i.e. for `onClick={this.submit}` the method `this.submit` should be bound to `this` in the constructor)
- [ ] Any internal methods bound to `this` are necessary to be bound (i.e. avoid `this.submit = this.submit.bind(this);` if `this.submit` is never passed to a component event handler like `onClick`)
- [ ] All JSX used for rendering exists in the render method
- [ ] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
- [ ] If a new CSS style is added I verified that:
- [ ] A similar style doesn't already exist
- [ ] The style can't be created with an existing [StyleUtils](https://github.com/Expensify/App/blob/main/src/styles/StyleUtils.js) function (i.e. `StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG`)
- [ ] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like `Avatar` is modified, I verified that `Avatar` is working as expected in all cases)
- [ ] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
- [ ] I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

</details>

### Screenshots/Videos
<details>
<summary>Web</summary>
Expand Down
25 changes: 25 additions & 0 deletions .github/actions/composite/configureAwsCredentials/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: 'Configure AWS Credentials'
description: 'Configures AWS credentials for the workflow'

inputs:
AWS_ACCESS_KEY_ID:
description: 'Access Key to AWS'
required: true
AWS_SECRET_ACCESS_KEY:
description: 'Secret Access Key to AWS'
required: true
AWS_REGION:
description: 'Region for AWS'
required: true
default: 'us-east-1'

runs:
using: composite
steps:
- name: Configure AWS Credentials
# Version: 1.5.5
uses: aws-actions/configure-aws-credentials@e97d7fbc8e0e5af69631c13daa0f4b5a8d88165b
with:
aws-access-key-id: ${{ inputs.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ inputs.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ inputs.AWS_REGION }}
4 changes: 2 additions & 2 deletions .github/actions/javascript/reviewerChecklist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const https = __nccwpck_require__(7211);
const GitHubUtils = __nccwpck_require__(7999);

const pathToReviewerChecklist = 'https://raw.githubusercontent.com/Expensify/App/main/contributingGuides/REVIEWER_CHECKLIST.md';
const reviewerChecklistStartsWith = '## Reviewer Checklist';
const reviewerChecklistContains = '# Reviewer Checklist';
const issue = github.context.payload.issue ? github.context.payload.issue.number : github.context.payload.pull_request.number;
const combinedComments = [];

Expand Down Expand Up @@ -75,7 +75,7 @@ function checkIssueForCompletedChecklist(numberOfChecklistItems) {
console.log(`Comment ${i} starts with: ${comment.slice(0, 20)}...`);

// Found the reviewer checklist, so count how many completed checklist items there are
if (comment.startsWith(reviewerChecklistStartsWith)) {
if (comment.indexOf(reviewerChecklistContains) !== -1) {
console.log('Found the reviewer checklist!');
foundReviewerChecklist = true;
numberOfFinishedChecklistItems = (comment.match(/- \[x\]/gi) || []).length;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const https = require('https');
const GitHubUtils = require('../../../libs/GithubUtils');

const pathToReviewerChecklist = 'https://raw.githubusercontent.com/Expensify/App/main/contributingGuides/REVIEWER_CHECKLIST.md';
const reviewerChecklistStartsWith = '## Reviewer Checklist';
const reviewerChecklistContains = '# Reviewer Checklist';
const issue = github.context.payload.issue ? github.context.payload.issue.number : github.context.payload.pull_request.number;
const combinedComments = [];

Expand Down Expand Up @@ -65,7 +65,7 @@ function checkIssueForCompletedChecklist(numberOfChecklistItems) {
console.log(`Comment ${i} starts with: ${comment.slice(0, 20)}...`);

// Found the reviewer checklist, so count how many completed checklist items there are
if (comment.startsWith(reviewerChecklistStartsWith)) {
if (comment.indexOf(reviewerChecklistContains) !== -1) {
console.log('Found the reviewer checklist!');
foundReviewerChecklist = true;
numberOfFinishedChecklistItems = (comment.match(/- \[x\]/gi) || []).length;
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/platformDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -245,12 +245,10 @@ jobs:
run: pip3 install cloudflare

- name: Configure AWS Credentials
# Version: 1.5.5
uses: aws-actions/configure-aws-credentials@e97d7fbc8e0e5af69631c13daa0f4b5a8d88165b
uses: Expensify/App/.github/actions/composite/configureAwsCredentials@main
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- name: Build web for production
if: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/preDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ jobs:

# Cache gradle to improve Android build time
- name: Gradle cache
uses: gradle/gradle-build-action@v2
uses: gradle/gradle-build-action@3fbe033aaae657f011f88f29be9e65ed26bd29ef

- name: Make zip directory for everything to send to AWS Device Farm
run: mkdir zip
Expand Down Expand Up @@ -271,15 +271,15 @@ jobs:
- name: Zip everything in the zip directory up
run: zip -qr App.zip ./zip

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
- name: Configure AWS Credentials
uses: Expensify/App/.github/actions/composite/configureAwsCredentials@main
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-west-2

- name: Schedule AWS Device Farm test run
uses: realm/aws-devicefarm/test-application@master
uses: realm/aws-devicefarm/test-application@7b9a91236c456c97e28d384c9e476035d5ea686b
with:
name: App E2E Performance Regression Tests
project_arn: ${{ secrets.AWS_PROJECT_ARN }}
Expand Down
64 changes: 26 additions & 38 deletions .github/workflows/testBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
workflow_dispatch:
pull_request_target:
types: [opened, synchronize]
branches: ['*ci-test/**']

env:
DEVELOPER_DIR: /Applications/Xcode_14.0.1.app/Contents/Developer
Expand Down Expand Up @@ -49,6 +50,12 @@ jobs:
env:
LARGE_SECRET_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }}

- name: Configure AWS Credentials
uses: Expensify/App/.github/actions/composite/configureAwsCredentials@main
with:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- name: Run Fastlane beta test
id: runFastlaneBetaTest
run: bundle exec fastlane android build_internal
Expand Down Expand Up @@ -99,6 +106,12 @@ jobs:
env:
LARGE_SECRET_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }}

- name: Configure AWS Credentials
uses: Expensify/App/.github/actions/composite/configureAwsCredentials@main
with:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- name: Run Fastlane
run: bundle exec fastlane ios build_internal
env:
Expand Down Expand Up @@ -131,6 +144,12 @@ jobs:
env:
DEVELOPER_ID_SECRET_PASSPHRASE: ${{ secrets.DEVELOPER_ID_SECRET_PASSPHRASE }}

- name: Configure AWS Credentials
uses: Expensify/App/.github/actions/composite/configureAwsCredentials@main
with:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- name: Build desktop app for testing
run: npm run desktop-build-internal -- --publish always
env:
Expand All @@ -140,44 +159,12 @@ jobs:
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

# web:
# name: Build and deploy Web
# needs: validateActor
# if: ${{ fromJSON(needs.validateActor.outputs.IS_TEAM_MEMBER) }}
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
# with:
# fetch-depth: 0
# ref: ${{ github.event.pull_request.head.sha }}

# - uses: Expensify/App/.github/actions/composite/setupNode@main

# - name: Configure AWS Credentials
# # Version: 1.5.5
# uses: aws-actions/configure-aws-credentials@e97d7fbc8e0e5af69631c13daa0f4b5a8d88165b
# with:
# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# aws-region: us-east-1

# - name: Build web for staging
# run: npm run build-staging

# - name: Build docs
# run: npm run storybook-build
# continue-on-error: true

# - name: Deploy to S3 for internal testing
# run: aws s3 cp --recursive --acl public-read "$GITHUB_WORKSPACE"/dist s3://ad-hoc-expensify-cash/web/"$PULL_REQUEST_NUMBER"
# env:
# PULL_REQUEST_NUMBER: ${{ github.event.number }}
PULL_REQUEST_NUMBER: ${{ github.event.number }}

postGithubComment:
runs-on: ubuntu-latest
name: Post a GitHub comment with app download links for testing
needs: [android, ios]
needs: [android, ios, desktop]
steps:
- name: Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
Expand All @@ -203,9 +190,10 @@ jobs:
- name: Publish links to apps for download
run: |
gh pr comment --body \
"Use the links below to test this build in android and iOS. Happy testing!
| android :robot: | iOS :apple: |
| ------------- | ------------- |
| ${{fromJson(steps.set_var.outputs.android_paths).html_path}} | ${{fromJson(steps.set_var.outputs.ios_paths).html_path}} |"
":test_tube::test_tube: Use the links below to test this build in android and iOS. Happy testing! :test_tube::test_tube:
| android :robot: | iOS :apple: | desktop :computer: |
| ------------- | ------------- | ------------- |
| ${{fromJson(steps.set_var.outputs.android_paths).html_path}} | ${{fromJson(steps.set_var.outputs.ios_paths).html_path}} | https://ad-hoc-expensify-cash.us-east-1.amazonaws.com/desktop/${{github.event.number}}/NewExpensify.dmg |
| ![Android](https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=${{fromJson(steps.set_var.outputs.android_paths).html_path}}) | ![iOS](https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=${{fromJson(steps.set_var.outputs.ios_paths).html_path}}) | ![desktop](https://ad-hoc-expensify-cash.us-east-1.amazonaws.com/desktop/${{github.event.number}}/NewExpensify.dmg) |"
env:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
2 changes: 1 addition & 1 deletion .storybook/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default create({
brandImage: 'logomark.svg',
colorPrimary: colors.dark,
colorSecondary: colors.orange,
fontBase: 'GTAmericaExp-Regular',
fontBase: 'ExpensifyNeue-Regular',
fontCode: 'monospace',
textInverseColor: colors.black,
});
8 changes: 6 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001023400
versionName "1.2.34-0"
versionCode 1001023602
versionName "1.2.36-2"
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()

if (isNewArchitectureEnabled()) {
Expand Down Expand Up @@ -289,6 +289,10 @@ dependencies {

implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"

def lifecycle_version = "2.5.0"
implementation "androidx.lifecycle:lifecycle-viewmodel:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"

debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
exclude group:'com.facebook.fbjni'
}
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
buildscript {
ext {
minSdkVersion = 21
compileSdkVersion = 31
targetSdkVersion = 31
compileSdkVersion = 32
targetSdkVersion = 32

if (System.properties['os.arch'] == "aarch64") {
// For M1 Users we need to use the NDK 24 which added support for aarch64
Expand Down
Loading

0 comments on commit 521214d

Please sign in to comment.