Skip to content

Commit

Permalink
Merge branch 'main' into fix/25405
Browse files Browse the repository at this point in the history
  • Loading branch information
dukenv0307 committed Sep 18, 2023
2 parents 9cabc60 + 203f79c commit 98a3bf5
Show file tree
Hide file tree
Showing 438 changed files with 16,099 additions and 4,709 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ module.exports = {
},
},
{
files: ['tests/**/*.{js,jsx,ts,tsx}', '.github/**/*.{js,jsx,ts,tsx}'],
files: ['workflow_tests/**/*.{js,jsx,ts,tsx}', 'tests/**/*.{js,jsx,ts,tsx}', '.github/**/*.{js,jsx,ts,tsx}'],
rules: {
'@lwc/lwc/no-async-await': 'off',
'no-await-in-loop': 'off',
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/cherryPick.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ jobs:
outputs:
IS_DEPLOYER: ${{ fromJSON(steps.isDeployer.outputs.IS_DEPLOYER) || github.actor == 'OSBotify' }}
steps:
- id: isDeployer
- name: Check if user is deployer
id: isDeployer
run: |
if gh api /orgs/Expensify/teams/mobile-deployers/memberships/${{ github.actor }} --silent; then
echo "IS_DEPLOYER=true" >> "$GITHUB_OUTPUT"
Expand All @@ -39,7 +40,8 @@ jobs:
ref: staging
token: ${{ secrets.OS_BOTIFY_TOKEN }}

- uses: Expensify/App/.github/actions/composite/setupGitForOSBotify@main
- name: Set up git for OSBotify
uses: Expensify/App/.github/actions/composite/setupGitForOSBotify@main
with:
GPG_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }}

Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/cla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,20 @@ jobs:
# It does not run for pull requests created by OSBotify
if: ${{ github.event.issue.pull_request || (github.event_name == 'pull_request_target' && github.event.pull_request.user.login != 'OSBotify') }}
steps:
- uses: actions-ecosystem/action-regex-match@9c35fe9ac1840239939c59e5db8839422eed8a73
- name: CLA comment check
uses: actions-ecosystem/action-regex-match@9c35fe9ac1840239939c59e5db8839422eed8a73
id: sign
with:
text: ${{ github.event.comment.body }}
regex: '\s*I have read the CLA Document and I hereby sign the CLA\s*'
- uses: actions-ecosystem/action-regex-match@9c35fe9ac1840239939c59e5db8839422eed8a73
- name: CLA comment re-check
uses: actions-ecosystem/action-regex-match@9c35fe9ac1840239939c59e5db8839422eed8a73
id: recheck
with:
text: ${{ github.event.comment.body }}
regex: '\s*recheck\s*'
- name: CLA Assistant
if: ${{ steps.recheck.outputs.match != '' || steps.sign.outputs.match != '' }} || github.event_name == 'pull_request_target'
if: ${{ steps.recheck.outputs.match != '' || steps.sign.outputs.match != '' || github.event_name == 'pull_request_target' }}
# Version: 2.1.2-beta
uses: cla-assistant/github-action@948230deb0d44dd38957592f08c6bd934d96d0cf
env:
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/createNewVersion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,21 @@ jobs:
NEW_VERSION: ${{ steps.bumpVersion.outputs.NEW_VERSION }}

steps:
- uses: softprops/turnstyle@ca99add00ff0c9cbc697d22631d2992f377e5bd5
- name: Run turnstyle
uses: softprops/turnstyle@ca99add00ff0c9cbc697d22631d2992f377e5bd5
with:
poll-interval-seconds: 10
env:
GITHUB_TOKEN: ${{ github.token }}

- uses: actions/checkout@v3
- name: Check out
uses: actions/checkout@v3
with:
ref: main
token: ${{ secrets.OS_BOTIFY_TOKEN }}

- uses: Expensify/App/.github/actions/composite/setupGitForOSBotify@main
- name: Setup git for OSBotify
uses: Expensify/App/.github/actions/composite/setupGitForOSBotify@main
with:
GPG_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }}

Expand All @@ -89,7 +92,8 @@ jobs:
- name: Update main branch
run: git push origin main

- if: ${{ failure() }}
- name: Announce failed workflow in Slack
if: ${{ failure() }}
uses: Expensify/App/.github/actions/composite/announceFailedWorkflowInSlack@main
with:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
9 changes: 6 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ jobs:
ref: staging
token: ${{ secrets.OS_BOTIFY_TOKEN }}

- uses: Expensify/App/.github/actions/composite/setupGitForOSBotify@main
- name: Setup git for OSBotify
uses: Expensify/App/.github/actions/composite/setupGitForOSBotify@main
with:
GPG_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }}

Expand All @@ -29,12 +30,14 @@ jobs:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/production'
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3
with:
ref: production
token: ${{ secrets.OS_BOTIFY_TOKEN }}

- uses: Expensify/App/.github/actions/composite/setupGitForOSBotify@main
- name: Setup git for OSBotify
uses: Expensify/App/.github/actions/composite/setupGitForOSBotify@main
with:
GPG_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }}

Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/deployBlocker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ jobs:
if: ${{ github.event.label.name == 'DeployBlockerCash' }}

steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}

Expand Down Expand Up @@ -63,7 +64,8 @@ jobs:
2. Find someone who can quickly fix the issue.
3. Fix the issue yourself.
- if: ${{ failure() }}
- name: Announce failed workflow in Slack
if: ${{ failure() }}
uses: Expensify/App/.github/actions/composite/announceFailedWorkflowInSlack@main
with:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
27 changes: 17 additions & 10 deletions .github/workflows/finishReleaseCycle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}

- name: Reopen and comment on issue
- name: Reopen and comment on issue (not a team member)
if: ${{ !fromJSON(steps.isDeployer.outputs.IS_DEPLOYER) }}
uses: Expensify/App/.github/actions/javascript/reopenIssueWithComment@main
with:
Expand All @@ -41,8 +41,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
ISSUE_NUMBER: ${{ github.event.issue.number }}

- name: Reopen and comment on issue
if: ${{ fromJSON(steps.isDeployer.outputs.IS_DEPLOYER) && fromJSON(steps.checkDeployBlockers.outputs.HAS_DEPLOY_BLOCKERS) }}
- name: Reopen and comment on issue (has blockers)
if: ${{ fromJSON(steps.isDeployer.outputs.IS_DEPLOYER) && fromJSON(steps.checkDeployBlockers.outputs.HAS_DEPLOY_BLOCKERS || 'false') }}
uses: Expensify/App/.github/actions/javascript/reopenIssueWithComment@main
with:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
Expand All @@ -51,7 +51,8 @@ jobs:
This issue either has unchecked items or has not yet been marked with the `:shipit:` emoji of approval.
Reopening!
- if: ${{ failure() }}
- name: Announce failed workflow in Slack
if: ${{ failure() }}
uses: Expensify/App/.github/actions/composite/announceFailedWorkflowInSlack@main
with:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
Expand All @@ -62,12 +63,14 @@ jobs:
needs: validate
if: ${{ fromJSON(needs.validate.outputs.isValid) }}
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3
with:
ref: staging
token: ${{ secrets.OS_BOTIFY_TOKEN }}

- uses: Expensify/App/.github/actions/composite/setupGitForOSBotify@main
- name: Setup Git for OSBotify
uses: Expensify/App/.github/actions/composite/setupGitForOSBotify@main
with:
GPG_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }}

Expand All @@ -79,7 +82,8 @@ jobs:
# Force-update the remote production branch.
git push --force origin production
- if: ${{ failure() }}
- name: Announce failed workflow in Slack
if: ${{ failure() }}
uses: Expensify/App/.github/actions/composite/announceFailedWorkflowInSlack@main
with:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
Expand All @@ -98,12 +102,14 @@ jobs:
runs-on: ubuntu-latest
needs: [updateProduction, createNewPatchVersion]
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3
with:
ref: main
token: ${{ secrets.OS_BOTIFY_TOKEN }}

- uses: Expensify/App/.github/actions/composite/setupGitForOSBotify@main
- name: Setup Git for OSBotify
uses: Expensify/App/.github/actions/composite/setupGitForOSBotify@main
with:
GPG_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }}

Expand All @@ -115,7 +121,8 @@ jobs:
# Force-update the remote staging branch
git push --force origin staging
- if: ${{ failure() }}
- name: Announce failed workflow in Slack
if: ${{ failure() }}
uses: Expensify/App/.github/actions/composite/announceFailedWorkflowInSlack@main
with:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
6 changes: 4 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ jobs:
if: ${{ github.actor != 'OSBotify' || github.event_name == 'workflow_call' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
- name: Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8

- uses: Expensify/App/.github/actions/composite/setupNode@main
- name: Setup Node
uses: Expensify/App/.github/actions/composite/setupNode@main

- name: Lint JavaScript and Typescript with ESLint
run: npm run lint
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/lockDeploys.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ jobs:
if: ${{ github.event.label.name == '🔐 LockCashDeploys 🔐' && contains(github.event.issue.labels.*.name, 'StagingDeployCash') && github.actor != 'OSBotify' }}
runs-on: macos-12
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3
with:
ref: main
token: ${{ secrets.OS_BOTIFY_TOKEN }}
Expand All @@ -27,7 +28,8 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}

- if: ${{ failure() }}
- name: Announce failed workflow
if: ${{ failure() }}
uses: Expensify/App/.github/actions/composite/announceFailedWorkflowInSlack@main
with:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
54 changes: 36 additions & 18 deletions .github/workflows/platformDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ jobs:
outputs:
IS_DEPLOYER: ${{ fromJSON(steps.isUserDeployer.outputs.IS_DEPLOYER) || github.actor == 'OSBotify' }}
steps:
- id: isUserDeployer
- name: Check if user is deployer
id: isUserDeployer
run: |
if gh api /orgs/Expensify/teams/mobile-deployers/memberships/${{ github.actor }} --silent; then
echo "IS_DEPLOYER=true" >> "$GITHUB_OUTPUT"
Expand All @@ -32,14 +33,17 @@ jobs:
deployChecklist:
name: Create or update deploy checklist
runs-on: ubuntu-latest
if: ${{ github.event_name != 'release' }}
needs: validateActor
steps:
- uses: actions/checkout@v3
- uses: Expensify/App/.github/actions/composite/setupNode@main
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: Expensify/App/.github/actions/composite/setupNode@main

- name: Set version
id: getVersion
run: echo "VERSION=$(npm run print-version --silent)" >> "$GITHUB_ENV"
run: echo "VERSION=$(npm run print-version --silent)" >> "$GITHUB_OUTPUT"

- name: Create or update staging deploy
uses: Expensify/App/.github/actions/javascript/createOrUpdateStagingDeploy@main
Expand All @@ -53,14 +57,17 @@ jobs:
if: ${{ fromJSON(needs.validateActor.outputs.IS_DEPLOYER) }}
runs-on: ubuntu-latest-xl
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3

- name: Configure MapBox SDK
run: ./scripts/setup-mapbox-sdk.sh ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- uses: Expensify/App/.github/actions/composite/setupNode@main
- name: Setup Node
uses: Expensify/App/.github/actions/composite/setupNode@main

- uses: ruby/setup-ruby@eae47962baca661befdfd24e4d6c34ade04858f7
- name: Setup Ruby
uses: ruby/setup-ruby@eae47962baca661befdfd24e4d6c34ade04858f7
with:
ruby-version: '2.7'
bundler-cache: true
Expand Down Expand Up @@ -127,9 +134,11 @@ jobs:
if: ${{ fromJSON(needs.validateActor.outputs.IS_DEPLOYER) }}
runs-on: macos-12-xl
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3

- uses: Expensify/App/.github/actions/composite/setupNode@main
- name: Setup Node
uses: Expensify/App/.github/actions/composite/setupNode@main

- name: Decrypt Developer ID Certificate
run: cd desktop && gpg --quiet --batch --yes --decrypt --passphrase="$DEVELOPER_ID_SECRET_PASSPHRASE" --output developer_id.p12 developer_id.p12.gpg
Expand Down Expand Up @@ -164,14 +173,17 @@ jobs:
if: ${{ fromJSON(needs.validateActor.outputs.IS_DEPLOYER) }}
runs-on: macos-12-xl
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3

- name: Configure MapBox SDK
run: ./scripts/setup-mapbox-sdk.sh ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- uses: Expensify/App/.github/actions/composite/setupNode@main
- name: Setup Node
uses: Expensify/App/.github/actions/composite/setupNode@main

- uses: ruby/setup-ruby@eae47962baca661befdfd24e4d6c34ade04858f7
- name: Setup Ruby
uses: ruby/setup-ruby@eae47962baca661befdfd24e4d6c34ade04858f7
with:
ruby-version: '2.7'
bundler-cache: true
Expand Down Expand Up @@ -266,9 +278,11 @@ jobs:
if: ${{ fromJSON(needs.validateActor.outputs.IS_DEPLOYER) }}
runs-on: ubuntu-latest-xl
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3

- uses: Expensify/App/.github/actions/composite/setupNode@main
- name: Setup Node
uses: Expensify/App/.github/actions/composite/setupNode@main

- name: Setup Cloudflare CLI
run: pip3 install cloudflare
Expand Down Expand Up @@ -323,7 +337,8 @@ jobs:
if: ${{ failure() }}
needs: [android, desktop, iOS, web]
steps:
- uses: Expensify/App/.github/actions/composite/announceFailedWorkflowInSlack@main
- name: Post Slack message on failure
uses: Expensify/App/.github/actions/composite/announceFailedWorkflowInSlack@main
with:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}

Expand All @@ -333,7 +348,8 @@ jobs:
if: ${{ success() }}
needs: [android, desktop, iOS, web]
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3

- name: Set version
run: echo "VERSION=$(npm run print-version --silent)" >> "$GITHUB_ENV"
Expand Down Expand Up @@ -393,9 +409,11 @@ jobs:
if: ${{ always() }}
needs: [android, desktop, iOS, web]
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3

- uses: Expensify/App/.github/actions/composite/setupNode@main
- name: Setup Node
uses: Expensify/App/.github/actions/composite/setupNode@main

- name: Set version
run: echo "VERSION=$(npm run print-version --silent)" >> "$GITHUB_ENV"
Expand Down
Loading

0 comments on commit 98a3bf5

Please sign in to comment.