From cc43bd41fea9fc3fee9d3cd4ffe414c1ba0961e9 Mon Sep 17 00:00:00 2001 From: rory Date: Tue, 24 Oct 2023 16:39:41 -0700 Subject: [PATCH 01/20] Skip reassure tests for unrelated changes --- .github/workflows/reassurePerformanceTests.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/reassurePerformanceTests.yml b/.github/workflows/reassurePerformanceTests.yml index ab5e1d06e5a4..8eff8e032b1d 100644 --- a/.github/workflows/reassurePerformanceTests.yml +++ b/.github/workflows/reassurePerformanceTests.yml @@ -13,10 +13,22 @@ jobs: - name: Checkout uses: actions/checkout@v3 + - name: Exit early if the PR doesn't affect the main app + id: shouldSkip + run: | + if git diff --exit-code --name-only main -- ':!docs/' ':!.github/' ':!contributingGuides' ':!tests' ':!workflow_tests'; then + echo "Only unrelated changed detecting, skipping reassure..." + echo "SHOULD_SKIP=true" >> "$GITHUB_OUTPUT" + else + echo "SHOULD_SKIP=false" >> "GITHUB_OUTPUT" + fi + - name: Setup NodeJS + if: steps.shouldSkip.outputs.SHOULD_SKIP != 'true' uses: Expensify/App/.github/actions/composite/setupNode@main - name: Run performance testing script + if: steps.shouldSkip.outputs.SHOULD_SKIP != 'true' shell: bash run: | set -e @@ -30,12 +42,14 @@ jobs: npx reassure --branch - name: Read output.json + if: steps.shouldSkip.outputs.SHOULD_SKIP != 'true' id: reassure uses: juliangruber/read-file-action@v1 with: path: .reassure/output.json - name: Validate output.json + if: steps.shouldSkip.outputs.SHOULD_SKIP != 'true' id: validateReassureOutput uses: Expensify/App/.github/actions/javascript/validateReassureOutput@main with: From 752264831b8b9b82e79aeb7534d05df4d30a79b9 Mon Sep 17 00:00:00 2001 From: rory Date: Tue, 24 Oct 2023 16:41:30 -0700 Subject: [PATCH 02/20] Also skip any md files --- .github/workflows/reassurePerformanceTests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reassurePerformanceTests.yml b/.github/workflows/reassurePerformanceTests.yml index 8eff8e032b1d..3fff1575d377 100644 --- a/.github/workflows/reassurePerformanceTests.yml +++ b/.github/workflows/reassurePerformanceTests.yml @@ -16,7 +16,7 @@ jobs: - name: Exit early if the PR doesn't affect the main app id: shouldSkip run: | - if git diff --exit-code --name-only main -- ':!docs/' ':!.github/' ':!contributingGuides' ':!tests' ':!workflow_tests'; then + if git diff --exit-code --name-only main -- ':!docs/' ':!.github/' ':!contributingGuides' ':!tests' ':!workflow_tests' ':!*.md'; then echo "Only unrelated changed detecting, skipping reassure..." echo "SHOULD_SKIP=true" >> "$GITHUB_OUTPUT" else From d2f7274beb1e69e6d997d2f1a3e7284d072d7fa1 Mon Sep 17 00:00:00 2001 From: rory Date: Tue, 24 Oct 2023 16:45:06 -0700 Subject: [PATCH 03/20] Use built-in paths-ignore option --- .github/workflows/reassurePerformanceTests.yml | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/.github/workflows/reassurePerformanceTests.yml b/.github/workflows/reassurePerformanceTests.yml index 3fff1575d377..a9e674d087b8 100644 --- a/.github/workflows/reassurePerformanceTests.yml +++ b/.github/workflows/reassurePerformanceTests.yml @@ -4,6 +4,7 @@ on: pull_request: types: [opened, synchronize] branches-ignore: [staging, production] + paths-ignore: [docs, .github, contributingGuides, tests, workflow_tests, '*.md'] jobs: perf-tests: @@ -13,22 +14,10 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Exit early if the PR doesn't affect the main app - id: shouldSkip - run: | - if git diff --exit-code --name-only main -- ':!docs/' ':!.github/' ':!contributingGuides' ':!tests' ':!workflow_tests' ':!*.md'; then - echo "Only unrelated changed detecting, skipping reassure..." - echo "SHOULD_SKIP=true" >> "$GITHUB_OUTPUT" - else - echo "SHOULD_SKIP=false" >> "GITHUB_OUTPUT" - fi - - name: Setup NodeJS - if: steps.shouldSkip.outputs.SHOULD_SKIP != 'true' uses: Expensify/App/.github/actions/composite/setupNode@main - name: Run performance testing script - if: steps.shouldSkip.outputs.SHOULD_SKIP != 'true' shell: bash run: | set -e @@ -42,14 +31,12 @@ jobs: npx reassure --branch - name: Read output.json - if: steps.shouldSkip.outputs.SHOULD_SKIP != 'true' id: reassure uses: juliangruber/read-file-action@v1 with: path: .reassure/output.json - name: Validate output.json - if: steps.shouldSkip.outputs.SHOULD_SKIP != 'true' id: validateReassureOutput uses: Expensify/App/.github/actions/javascript/validateReassureOutput@main with: From dd2b24f855ddb2a337061a3d4c8994d3db511fe0 Mon Sep 17 00:00:00 2001 From: rory Date: Tue, 24 Oct 2023 17:57:32 -0700 Subject: [PATCH 04/20] Skip lint for PRs that only affect unlinted files --- .github/workflows/lint.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b403a1eb737c..360631920cf1 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -5,6 +5,7 @@ on: pull_request: types: [opened, synchronize] branches-ignore: [staging, production] + paths: ['**.js', '**.ts', '**.tsx', '**.sh'] jobs: lint: From f6095d79f70b345534203d8dc9382bb65a5d007a Mon Sep 17 00:00:00 2001 From: rory Date: Tue, 24 Oct 2023 17:59:10 -0700 Subject: [PATCH 05/20] Skip tests for unaffected PRs --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 72bdd0468fd2..616c5f6acf96 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,6 +5,7 @@ on: pull_request: types: [opened, synchronize] branches-ignore: [staging, production] + paths: ['**.js', '**.ts', '**.tsx', '**.sh', 'package.json', 'package-lock.json'] jobs: jest: From ce985ef22ffa0b495cfe9501d669d6d5beef9fe0 Mon Sep 17 00:00:00 2001 From: rory Date: Tue, 24 Oct 2023 18:00:01 -0700 Subject: [PATCH 06/20] Skip typecheck for unaffected PRs --- .github/workflows/typecheck.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml index de433b2ae88a..c9f8481b44b8 100644 --- a/.github/workflows/typecheck.yml +++ b/.github/workflows/typecheck.yml @@ -5,6 +5,7 @@ on: pull_request: types: [opened, synchronize] branches-ignore: [staging, production] + paths: ['*.ts', '*.tsx', 'package.json', 'package-lock.json'] jobs: typecheck: From 73ac84aafadaf6c788d88d6f6bbae064bf9dbb9c Mon Sep 17 00:00:00 2001 From: rory Date: Tue, 24 Oct 2023 18:07:05 -0700 Subject: [PATCH 07/20] Skip deploy of app for unrelated changes --- .github/workflows/preDeploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/preDeploy.yml b/.github/workflows/preDeploy.yml index d7d372aa7948..7dafda43267b 100644 --- a/.github/workflows/preDeploy.yml +++ b/.github/workflows/preDeploy.yml @@ -2,8 +2,8 @@ name: Process new code merged to main on: push: - branches: - - main + branches: [main] + paths-ignore: [docs, contributingGuides, jest, tests, workflow_tests] jobs: typecheck: From f135ee3306b0aef07cfd9d65a1c5a3fd65199bbe Mon Sep 17 00:00:00 2001 From: rory Date: Tue, 24 Oct 2023 20:40:38 -0700 Subject: [PATCH 08/20] Move welcome comment to separate workflow --- .github/workflows/preDeploy.yml | 65 --------------------------------- .github/workflows/welcome.yml | 58 +++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 65 deletions(-) create mode 100644 .github/workflows/welcome.yml diff --git a/.github/workflows/preDeploy.yml b/.github/workflows/preDeploy.yml index 7dafda43267b..c05024030438 100644 --- a/.github/workflows/preDeploy.yml +++ b/.github/workflows/preDeploy.yml @@ -112,71 +112,6 @@ jobs: with: SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} - # Check if actor is member of Expensify organization by looking for Expensify/expensify team - isExpensifyEmployee: - runs-on: ubuntu-latest - - outputs: - IS_EXPENSIFY_EMPLOYEE: ${{ fromJSON(steps.checkAuthor.outputs.IS_EXPENSIFY_EMPLOYEE) }} - - steps: - - name: Get merged pull request - id: getMergedPullRequest - uses: roryabraham/action-get-merged-pull-request@7a7a194f6ff8f3eef58c822083695a97314ebec1 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - - - name: Check whether the PR author is member of Expensify/expensify team - id: checkAuthor - run: | - if gh api /orgs/Expensify/teams/expensify-expensify/memberships/${{ steps.getMergedPullRequest.outputs.author }} --silent; then - echo "IS_EXPENSIFY_EMPLOYEE=true" >> "$GITHUB_OUTPUT" - else - echo "IS_EXPENSIFY_EMPLOYEE=false" >> "$GITHUB_OUTPUT" - fi - env: - GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }} - - newContributorWelcomeMessage: - runs-on: ubuntu-latest - needs: isExpensifyEmployee - if: ${{ github.actor != 'OSBotify' && !fromJSON(needs.isExpensifyEmployee.outputs.IS_EXPENSIFY_EMPLOYEE) }} - steps: - # Version: 2.3.4 - - name: Checkout - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 - with: - token: ${{ secrets.OS_BOTIFY_TOKEN }} - - - name: Get merged pull request - id: getMergedPullRequest - # TODO: Point back action actions-ecosystem after https://github.com/actions-ecosystem/action-get-merged-pull-request/pull/223 is merged - uses: roryabraham/action-get-merged-pull-request@7a7a194f6ff8f3eef58c822083695a97314ebec1 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - - - name: Get PR count for ${{ steps.getMergedPullRequest.outputs.author }} - run: echo "PR_COUNT=$(gh pr list --author ${{ steps.getMergedPullRequest.outputs.author }} --state any | grep -c '')" >> "$GITHUB_ENV" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Comment on ${{ steps.getMergedPullRequest.outputs.author }}\'s first pull request! - if: ${{ fromJSON(env.PR_COUNT) == 1 }} - uses: actions-ecosystem/action-create-comment@cd098164398331c50e7dfdd0dfa1b564a1873fac - with: - github_token: ${{ secrets.OS_BOTIFY_TOKEN }} - number: ${{ steps.getMergedPullRequest.outputs.number }} - body: | - @${{ steps.getMergedPullRequest.outputs.author }}, Great job getting your first Expensify/App pull request over the finish line! :tada: - - I know there's a lot of information in our [contributing guidelines](https://github.com/Expensify/App/blob/main/contributingGuides/CONTRIBUTING.md), so here are some points to take note of :memo:: - - 1. Now that your first PR has been merged, you can be hired for another issue. Once you've completed a few issues, you may be eligible to work on more than one job at a time. - 2. Once your PR is deployed to our staging servers, it will undergo quality assurance (QA) testing. If we find that it doesn't work as expected or causes a regression, you'll be responsible for fixing it. Typically, we would revert this PR and give you another chance to create a similar PR without causing a regression. - 3. Once your PR is deployed to _production_, we start a 7-day timer :alarm_clock:. After it has been on production for 7 days without causing any regressions, then we pay out the Upwork job. :moneybag: - - So it might take a while before you're paid for your work, but we typically post multiple new jobs every day, so there's plenty of opportunity. I hope you've had a positive experience contributing to this repo! :blush: - e2ePerformanceTests: needs: [chooseDeployActions] if: ${{ needs.chooseDeployActions.outputs.SHOULD_DEPLOY }} diff --git a/.github/workflows/welcome.yml b/.github/workflows/welcome.yml new file mode 100644 index 000000000000..80f1a995eee5 --- /dev/null +++ b/.github/workflows/welcome.yml @@ -0,0 +1,58 @@ +name: Post new contributor welcome message + +on: + push: + branches: [main] + +jobs: + newContributorWelcomeMessage: + runs-on: ubuntu-latest + needs: isExpensifyEmployee + if: ${{ github.actor != 'OSBotify' && github.actor != 'imgbot[bot]' }} + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + token: ${{ secrets.OS_BOTIFY_TOKEN }} + + - name: Get merged pull request + id: getMergedPullRequest + run: | + read -r number author < <(gh pr list --search ${{ github.sha }} --state merged --json 'number,author' | jq -r '.[0] | [.number, .author.login] | join(" ")') + echo "number=$number" >> "$GITHUB_OUTPUT" + echo "author=$author" >> "$GITHUB_OUTPUT" + env: + GITHUB_TOKEN: ${{ github.token }} + + - name: Check whether the PR author is member of Expensify/expensify team + id: isExpensifyEmployee + run: | + if gh api /orgs/Expensify/teams/expensify-expensify/memberships/${{ steps.getMergedPullRequest.outputs.author }} --silent; then + echo "IS_EXPENSIFY_EMPLOYEE=true" >> "$GITHUB_OUTPUT" + else + echo "IS_EXPENSIFY_EMPLOYEE=false" >> "$GITHUB_OUTPUT" + fi + env: + GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }} + + - name: Get PR count for ${{ steps.getMergedPullRequest.outputs.author }} + id: getPRCount + run: echo "PR_COUNT=$(gh pr list --author ${{ steps.getMergedPullRequest.outputs.author }} --state any | grep -c '')" >> "$GITHUB_OUTPUT" + env: + GITHUB_TOKEN: ${{ github.token }} + + - name: Comment on ${{ steps.getMergedPullRequest.outputs.author }}\'s first pull request! + if: ${{ fromJSON(steps.getPRCount.outputs.PR_COUNT) == 1 }} + run: | + gh pr comment ${{ steps.getMergedPullRequest.outputs.number }} --body \ + "@${{ steps.getMergedPullRequest.outputs.author }}, Great job getting your first Expensify/App pull request over the finish line! :tada: + + I know there's a lot of information in our [contributing guidelines](https://github.com/Expensify/App/blob/main/contributingGuides/CONTRIBUTING.md), so here are some points to take note of :memo:: + + 1. Now that your first PR has been merged, you can be hired for another issue. Once you've completed a few issues, you may be eligible to work on more than one job at a time. + 2. Once your PR is deployed to our staging servers, it will undergo quality assurance (QA) testing. If we find that it doesn't work as expected or causes a regression, you'll be responsible for fixing it. Typically, we would revert this PR and give you another chance to create a similar PR without causing a regression. + 3. Once your PR is deployed to _production_, we start a 7-day timer :alarm_clock:. After it has been on production for 7 days without causing any regressions, then we pay out the Upwork job. :moneybag: + + So it might take a while before you're paid for your work, but we typically post multiple new jobs every day, so there's plenty of opportunity. I hope you've had a positive experience contributing to this repo! :blush:" + env: + GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }} From cd3bc74c8cdc55b9e5839f60666db59a18c0f5fd Mon Sep 17 00:00:00 2001 From: rory Date: Tue, 24 Oct 2023 20:42:32 -0700 Subject: [PATCH 09/20] Remove unnecessary token --- .github/workflows/welcome.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/welcome.yml b/.github/workflows/welcome.yml index 80f1a995eee5..77b1e6047da0 100644 --- a/.github/workflows/welcome.yml +++ b/.github/workflows/welcome.yml @@ -12,8 +12,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: - token: ${{ secrets.OS_BOTIFY_TOKEN }} - name: Get merged pull request id: getMergedPullRequest From 76be1d5184445510ff3177e7b452dc22dda2e0a9 Mon Sep 17 00:00:00 2001 From: rory Date: Wed, 25 Oct 2023 12:05:02 -0700 Subject: [PATCH 10/20] Remove outdated needs --- .github/workflows/welcome.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/welcome.yml b/.github/workflows/welcome.yml index 77b1e6047da0..052a8010f128 100644 --- a/.github/workflows/welcome.yml +++ b/.github/workflows/welcome.yml @@ -7,7 +7,6 @@ on: jobs: newContributorWelcomeMessage: runs-on: ubuntu-latest - needs: isExpensifyEmployee if: ${{ github.actor != 'OSBotify' && github.actor != 'imgbot[bot]' }} steps: - name: Checkout From e80785939062474aa44eb1fb4a65209f4ed31e06 Mon Sep 17 00:00:00 2001 From: rory Date: Wed, 25 Oct 2023 12:06:40 -0700 Subject: [PATCH 11/20] Just use github.token for welcome comment --- .github/workflows/welcome.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/welcome.yml b/.github/workflows/welcome.yml index 052a8010f128..43e0e1650381 100644 --- a/.github/workflows/welcome.yml +++ b/.github/workflows/welcome.yml @@ -52,4 +52,4 @@ jobs: So it might take a while before you're paid for your work, but we typically post multiple new jobs every day, so there's plenty of opportunity. I hope you've had a positive experience contributing to this repo! :blush:" env: - GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }} + GITHUB_TOKEN: ${{ github.token }} From 835f7f74dbefe605bd840a0e2bec42ded0eae4d9 Mon Sep 17 00:00:00 2001 From: rory Date: Thu, 26 Oct 2023 14:36:27 -0700 Subject: [PATCH 12/20] Add test change in JS file - tests and lint should run --- src/components/InvertedFlatList/BaseInvertedFlatList.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/InvertedFlatList/BaseInvertedFlatList.js b/src/components/InvertedFlatList/BaseInvertedFlatList.js index 044143774dd6..49ceeb1ba4c6 100644 --- a/src/components/InvertedFlatList/BaseInvertedFlatList.js +++ b/src/components/InvertedFlatList/BaseInvertedFlatList.js @@ -143,6 +143,8 @@ function BaseInvertedFlatList(props) { ); } +// Note: this is a test change to a JS file + BaseInvertedFlatList.propTypes = propTypes; BaseInvertedFlatList.defaultProps = defaultProps; BaseInvertedFlatList.displayName = 'BaseInvertedFlatList'; From f9fa1dbb9344cd935991b7d6f85fec310ead77b2 Mon Sep 17 00:00:00 2001 From: rory Date: Thu, 26 Oct 2023 14:38:30 -0700 Subject: [PATCH 13/20] Ok now only a ts change --- src/CONST.ts | 2 ++ src/components/InvertedFlatList/BaseInvertedFlatList.js | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CONST.ts b/src/CONST.ts index 6602df7fa5eb..8483c0dfb5b6 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -9,6 +9,8 @@ import SCREENS from './SCREENS'; const EMPTY_ARRAY = Object.freeze([]); const EMPTY_OBJECT = Object.freeze({}); +// Test TS change + const CLOUDFRONT_DOMAIN = 'cloudfront.net'; const CLOUDFRONT_URL = `https://d2k5nsl2zxldvw.${CLOUDFRONT_DOMAIN}`; const ACTIVE_EXPENSIFY_URL = Url.addTrailingForwardSlash(Config?.NEW_EXPENSIFY_URL ?? 'https://new.expensify.com'); diff --git a/src/components/InvertedFlatList/BaseInvertedFlatList.js b/src/components/InvertedFlatList/BaseInvertedFlatList.js index 49ceeb1ba4c6..044143774dd6 100644 --- a/src/components/InvertedFlatList/BaseInvertedFlatList.js +++ b/src/components/InvertedFlatList/BaseInvertedFlatList.js @@ -143,8 +143,6 @@ function BaseInvertedFlatList(props) { ); } -// Note: this is a test change to a JS file - BaseInvertedFlatList.propTypes = propTypes; BaseInvertedFlatList.defaultProps = defaultProps; BaseInvertedFlatList.displayName = 'BaseInvertedFlatList'; From 7cacd8e8d8f85b7202d96fdf72a70957286aed67 Mon Sep 17 00:00:00 2001 From: rory Date: Thu, 26 Oct 2023 14:42:53 -0700 Subject: [PATCH 14/20] Consistently use double-wildcarding --- .github/workflows/preDeploy.yml | 2 +- .github/workflows/reassurePerformanceTests.yml | 2 +- .github/workflows/typecheck.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/preDeploy.yml b/.github/workflows/preDeploy.yml index c05024030438..bae843e74709 100644 --- a/.github/workflows/preDeploy.yml +++ b/.github/workflows/preDeploy.yml @@ -3,7 +3,7 @@ name: Process new code merged to main on: push: branches: [main] - paths-ignore: [docs, contributingGuides, jest, tests, workflow_tests] + paths-ignore: [docs/**, contributingGuides/**, jest/**, tests/**, workflow_tests/**] jobs: typecheck: diff --git a/.github/workflows/reassurePerformanceTests.yml b/.github/workflows/reassurePerformanceTests.yml index a9e674d087b8..22b416df9aca 100644 --- a/.github/workflows/reassurePerformanceTests.yml +++ b/.github/workflows/reassurePerformanceTests.yml @@ -4,7 +4,7 @@ on: pull_request: types: [opened, synchronize] branches-ignore: [staging, production] - paths-ignore: [docs, .github, contributingGuides, tests, workflow_tests, '*.md'] + paths-ignore: [docs/**, .github/**, contributingGuides/**, tests/**, workflow_tests/**, '**.md'] jobs: perf-tests: diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml index c9f8481b44b8..776169fc6058 100644 --- a/.github/workflows/typecheck.yml +++ b/.github/workflows/typecheck.yml @@ -5,7 +5,7 @@ on: pull_request: types: [opened, synchronize] branches-ignore: [staging, production] - paths: ['*.ts', '*.tsx', 'package.json', 'package-lock.json'] + paths: ['**.ts', '**.tsx', 'package.json', 'package-lock.json'] jobs: typecheck: From bf72a7cf4848f41f971d1f4e1147bf6c8d7fc3c0 Mon Sep 17 00:00:00 2001 From: rory Date: Thu, 26 Oct 2023 14:44:01 -0700 Subject: [PATCH 15/20] remove test ts change --- src/CONST.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/CONST.ts b/src/CONST.ts index 8483c0dfb5b6..6602df7fa5eb 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -9,8 +9,6 @@ import SCREENS from './SCREENS'; const EMPTY_ARRAY = Object.freeze([]); const EMPTY_OBJECT = Object.freeze({}); -// Test TS change - const CLOUDFRONT_DOMAIN = 'cloudfront.net'; const CLOUDFRONT_URL = `https://d2k5nsl2zxldvw.${CLOUDFRONT_DOMAIN}`; const ACTIVE_EXPENSIFY_URL = Url.addTrailingForwardSlash(Config?.NEW_EXPENSIFY_URL ?? 'https://new.expensify.com'); From ac41cd850de9df21939f2824ecb8caec76bcf242 Mon Sep 17 00:00:00 2001 From: rory Date: Thu, 26 Oct 2023 14:45:32 -0700 Subject: [PATCH 16/20] Test markdown change --- contributingGuides/API.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contributingGuides/API.md b/contributingGuides/API.md index aea684417e41..e7745220f316 100644 --- a/contributingGuides/API.md +++ b/contributingGuides/API.md @@ -1,6 +1,8 @@ # API Details These are best practices related to the current API used for App. +Test MD change + ## Philosophy - We desire to have a 1:1:1 ratio of user action to web server (PHP) commands to database server (Auth) commands. - Each user action should generate at most 1 API call. From ca0235a6a7443c552facc14b108de746f5085ce7 Mon Sep 17 00:00:00 2001 From: rory Date: Thu, 26 Oct 2023 14:46:58 -0700 Subject: [PATCH 17/20] Test markdown change in docs folder --- contributingGuides/API.md | 2 -- .../expensify-classic/account-settings/Close-Account.md | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/contributingGuides/API.md b/contributingGuides/API.md index e7745220f316..aea684417e41 100644 --- a/contributingGuides/API.md +++ b/contributingGuides/API.md @@ -1,8 +1,6 @@ # API Details These are best practices related to the current API used for App. -Test MD change - ## Philosophy - We desire to have a 1:1:1 ratio of user action to web server (PHP) commands to database server (Auth) commands. - Each user action should generate at most 1 API call. diff --git a/docs/articles/expensify-classic/account-settings/Close-Account.md b/docs/articles/expensify-classic/account-settings/Close-Account.md index 5e18490fc357..2c416ee0ed80 100644 --- a/docs/articles/expensify-classic/account-settings/Close-Account.md +++ b/docs/articles/expensify-classic/account-settings/Close-Account.md @@ -3,3 +3,4 @@ title: Close Account description: Close Account --- ## Resource Coming Soon! +Test markdown change in docs/ From 2e3037de05d3c6cb3fdb0e3f8b08a037c0382273 Mon Sep 17 00:00:00 2001 From: rory Date: Thu, 26 Oct 2023 14:48:03 -0700 Subject: [PATCH 18/20] Remove test markdown change --- .../articles/expensify-classic/account-settings/Close-Account.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/articles/expensify-classic/account-settings/Close-Account.md b/docs/articles/expensify-classic/account-settings/Close-Account.md index 2c416ee0ed80..5e18490fc357 100644 --- a/docs/articles/expensify-classic/account-settings/Close-Account.md +++ b/docs/articles/expensify-classic/account-settings/Close-Account.md @@ -3,4 +3,3 @@ title: Close Account description: Close Account --- ## Resource Coming Soon! -Test markdown change in docs/ From 33f15e8d85b3366b1a09bca914f61d5caa4a2fb5 Mon Sep 17 00:00:00 2001 From: rory Date: Thu, 26 Oct 2023 14:59:44 -0700 Subject: [PATCH 19/20] Separate out shell script linting --- .github/workflows/lint.yml | 7 ++----- .github/workflows/shellCheck.yml | 19 +++++++++++++++++++ scripts/shellCheck.sh | 8 +++++++- 3 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/shellCheck.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 360631920cf1..9d7efc7d4c29 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -5,7 +5,7 @@ on: pull_request: types: [opened, synchronize] branches-ignore: [staging, production] - paths: ['**.js', '**.ts', '**.tsx', '**.sh'] + paths: ['**.js', '**.ts', '**.tsx'] jobs: lint: @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 + uses: actions/checkout@v3 - name: Setup Node uses: Expensify/App/.github/actions/composite/setupNode@main @@ -23,9 +23,6 @@ jobs: env: CI: true - - name: Lint shell scripts with ShellCheck - run: npm run shellcheck - - name: Verify there's no Prettier diff run: | npm run prettier -- --loglevel silent diff --git a/.github/workflows/shellCheck.yml b/.github/workflows/shellCheck.yml new file mode 100644 index 000000000000..609541e9a660 --- /dev/null +++ b/.github/workflows/shellCheck.yml @@ -0,0 +1,19 @@ +name: Lint shell code + +on: + workflow_call: + pull_request: + types: [opened, synchronize] + branches-ignore: [staging, production] + paths: ['**.sh'] + +jobs: + lint: + if: ${{ github.actor != 'OSBotify' || github.event_name == 'workflow_call' }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Lint shell scripts with ShellCheck + run: npm run shellcheck diff --git a/scripts/shellCheck.sh b/scripts/shellCheck.sh index 14424b4d9b30..d148958900d4 100755 --- a/scripts/shellCheck.sh +++ b/scripts/shellCheck.sh @@ -22,7 +22,13 @@ info ASYNC_PROCESSES=() for SHELL_SCRIPT in $SHELL_SCRIPTS; do - npx shellcheck -e SC1091 "$SHELL_SCRIPT" & + if [[ "$CI" == 'true' ]]; then + # ShellCheck is installed by default on GitHub Actions ubuntu runners + shellcheck -e SC1091 "$SHELL_SCRIPT" & + else + # Otherwise shellcheck is used via npx + npx shellcheck -e SC1091 "$SHELL_SCRIPT" & + fi ASYNC_PROCESSES+=($!) done From 0c7c06f67259cef571d5f1ee5b1acbdae525edd6 Mon Sep 17 00:00:00 2001 From: rory Date: Thu, 26 Oct 2023 15:14:02 -0700 Subject: [PATCH 20/20] Ignore shell scripts in reassurePerformanceTests --- .github/workflows/reassurePerformanceTests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reassurePerformanceTests.yml b/.github/workflows/reassurePerformanceTests.yml index 22b416df9aca..b259ff9052b6 100644 --- a/.github/workflows/reassurePerformanceTests.yml +++ b/.github/workflows/reassurePerformanceTests.yml @@ -4,7 +4,7 @@ on: pull_request: types: [opened, synchronize] branches-ignore: [staging, production] - paths-ignore: [docs/**, .github/**, contributingGuides/**, tests/**, workflow_tests/**, '**.md'] + paths-ignore: [docs/**, .github/**, contributingGuides/**, tests/**, workflow_tests/**, '**.md', '**.sh'] jobs: perf-tests: