Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@radoslawkrzemien/13604 local testing of GitHub actions #21937

Merged
Show file tree
Hide file tree
Changes from 134 commits
Commits
Show all changes
147 commits
Select commit Hold shift + click to select a range
5277afe
Add repo to gitignore
radoslawkrzemien Feb 21, 2023
2e25354
Add new dependencies
radoslawkrzemien Feb 21, 2023
5816c30
Add configs
radoslawkrzemien Feb 21, 2023
126d210
Add first proper test stub [WiP]
radoslawkrzemien Feb 21, 2023
a61eaea
Refactor test configuration [WiP]
radoslawkrzemien Feb 21, 2023
abd6d56
Fix steps mocks [WiP]
radoslawkrzemien Feb 21, 2023
09a7610
Add output assertions [WiP]
radoslawkrzemien Feb 22, 2023
a4f31c6
Add tests for failing lint/test jobs [WiP]
radoslawkrzemien Feb 22, 2023
d48add5
Refactor test structure [WiP]
radoslawkrzemien Feb 22, 2023
c7b3b21
Clean up test file [WiP]
radoslawkrzemien Feb 23, 2023
b427262
Add new tests [WiP]
radoslawkrzemien Feb 23, 2023
1185420
Migrate from .ts to .js [WiP]
radoslawkrzemien Feb 24, 2023
65353d7
Add method for getting mock steps [WiP]
radoslawkrzemien Feb 24, 2023
d89c80c
Add method for getting step assertions [WiP]
radoslawkrzemien Feb 24, 2023
0467112
Remove tsconfig [WiP]
radoslawkrzemien Feb 27, 2023
50818e6
Add tests for chooseDeployActions/skipDeploy/createNewVersion/updateS…
radoslawkrzemien Feb 27, 2023
79c8f64
Add tests for push to a different branch [WiP]
radoslawkrzemien Feb 27, 2023
3922e7c
Add test for events different from push [WiP]
radoslawkrzemien Feb 27, 2023
1e578c8
Add documentation skeleton [WiP]
radoslawkrzemien Feb 27, 2023
8dbd8f8
Add file structure to documentation [WiP]
radoslawkrzemien Feb 27, 2023
29e12e2
Add utils description [WiP]
radoslawkrzemien Feb 27, 2023
489e902
Add breakdown of the test file structure [WiP]
radoslawkrzemien Feb 27, 2023
949f420
Add minor tweaks [WiP]
radoslawkrzemien Feb 27, 2023
d51407d
Add test for Slack announcement [WiP]
radoslawkrzemien Feb 28, 2023
665dbf9
Add setup section [WiP]
radoslawkrzemien Feb 28, 2023
31c1cf0
Add deploy tests [WiP]
radoslawkrzemien Feb 28, 2023
58d0a66
Clean up preDeploy.test.js [WiP]
radoslawkrzemien Feb 28, 2023
d9842c0
Tweak preDeploy config[WiP]
radoslawkrzemien Mar 1, 2023
0371c3c
Add test for different event
radoslawkrzemien Mar 1, 2023
67b9540
Add first platformDeploy test
radoslawkrzemien Mar 2, 2023
0c10277
Add method to overwrite the runner type
radoslawkrzemien Mar 3, 2023
6ebb7c8
Update readme
radoslawkrzemien Mar 3, 2023
a8adb24
Update test
radoslawkrzemien Mar 3, 2023
ebe4cf0
Add dependency
radoslawkrzemien Mar 3, 2023
951fae7
Extend Act class
radoslawkrzemien Mar 3, 2023
9f793d9
Update tests
radoslawkrzemien Mar 3, 2023
f6aa12a
Update tests
radoslawkrzemien Mar 8, 2023
d4ae0c6
Restructure utils
radoslawkrzemien Mar 8, 2023
714d134
Pre-generate test
radoslawkrzemien Mar 8, 2023
c82ae94
Add script to package.json
radoslawkrzemien Mar 8, 2023
6dfa60b
Update readme
radoslawkrzemien Mar 8, 2023
1ebc0d1
Fix imports
radoslawkrzemien Mar 8, 2023
cc59c3b
Update pre-generation script
radoslawkrzemien Mar 15, 2023
61b8906
Update setting event options
radoslawkrzemien Mar 15, 2023
5e7fe6a
Add step names
radoslawkrzemien Mar 15, 2023
99369ec
Add tests
radoslawkrzemien Mar 15, 2023
ff9f353
Update `finishReleaseCycle.yml`
radoslawkrzemien Mar 15, 2023
88e4bc1
Add more tests
radoslawkrzemien Mar 15, 2023
2659fec
Add npm script
radoslawkrzemien Mar 15, 2023
387f2c6
Add tests
radoslawkrzemien Mar 16, 2023
58906cc
Update readme
radoslawkrzemien Mar 16, 2023
5e1a607
Tweak pre-generation script
radoslawkrzemien Mar 16, 2023
74434b0
Add tests
radoslawkrzemien Mar 16, 2023
9ec9f89
Add tests
radoslawkrzemien Mar 17, 2023
9263449
Add tests
radoslawkrzemien Mar 24, 2023
6fc2a66
Refactor tests
radoslawkrzemien Mar 24, 2023
1894bc2
Add tests
radoslawkrzemien Mar 24, 2023
a7598f9
Add tests
radoslawkrzemien Mar 24, 2023
0e6e74c
Add tests
radoslawkrzemien Mar 24, 2023
24c72e3
Add tests
radoslawkrzemien Mar 27, 2023
f725614
Add tests
radoslawkrzemien Mar 27, 2023
2fa6af3
Add tests
radoslawkrzemien Mar 27, 2023
4428ec7
Add tests
radoslawkrzemien Mar 27, 2023
a01c9c3
Add tests
radoslawkrzemien Mar 27, 2023
bec56b0
Add tests
radoslawkrzemien Mar 27, 2023
ca06e2c
Add tests
radoslawkrzemien Mar 28, 2023
b54d479
Fix tests
radoslawkrzemien Mar 28, 2023
9275387
Update readme
radoslawkrzemien Mar 28, 2023
323be7c
Fix test
radoslawkrzemien Mar 28, 2023
23d0f78
Update package.json
radoslawkrzemien Mar 28, 2023
917d3d3
Fix tests
radoslawkrzemien Mar 29, 2023
0e83c0c
Fix workflow file
radoslawkrzemien Mar 30, 2023
7866213
Move dependencies
radoslawkrzemien Mar 31, 2023
11c5919
Move repo files
radoslawkrzemien Mar 31, 2023
115f3c4
Rename functions
radoslawkrzemien Mar 31, 2023
a5c8fd0
Rename references
radoslawkrzemien Mar 31, 2023
7982c3f
Update readme
radoslawkrzemien Mar 31, 2023
c656216
Update readme
radoslawkrzemien Mar 31, 2023
05c497b
Add logging raw output to file
radoslawkrzemien Apr 28, 2023
0e717b2
Update workflow paths and fix test after merge
radoslawkrzemien Apr 28, 2023
7d6f1f8
Remove mock repo dir before tests
radoslawkrzemien May 22, 2023
0b4e066
Reorder README
radoslawkrzemien May 22, 2023
eb021d8
Rework logfiles creation
radoslawkrzemien May 22, 2023
7cbc67b
Add `workflow_tests` to `ignorePatterns`
radoslawkrzemien May 25, 2023
2b308f9
Fix lint problems
radoslawkrzemien May 25, 2023
3dd9843
Fix failing tests
radoslawkrzemien May 25, 2023
079c052
Run prettier
radoslawkrzemien May 26, 2023
d6521cb
Tiny reformat
radoslawkrzemien May 26, 2023
9740220
Job mocking
radoslawkrzemien Jun 14, 2023
0d53de0
Revert reusable workflow as step
radoslawkrzemien Jun 14, 2023
ad3bae3
Remove runs-on
radoslawkrzemien Jun 14, 2023
c69319c
Pass with to steps
radoslawkrzemien Jun 14, 2023
50159e4
Revert workflow change in finishReleaseCycle
radoslawkrzemien Jun 14, 2023
52d7eda
Revert workflow change in preDeploy
radoslawkrzemien Jun 14, 2023
0249907
Resolve conflicts
radoslawkrzemien Jun 14, 2023
25ab35f
Fix test
radoslawkrzemien Jun 14, 2023
c8b4b87
Fix test
radoslawkrzemien Jun 14, 2023
1c486c3
Fix tests
radoslawkrzemien Jun 15, 2023
bc9cc47
Update package-lock
radoslawkrzemien Jun 30, 2023
2ce14ce
Merge remote-tracking branch 'origin/main' into @radoslawkrzemien/136…
radoslawkrzemien Jun 30, 2023
9f74565
Update package-lock
radoslawkrzemien Jun 30, 2023
bc1487c
Fix cherryPick tests
radoslawkrzemien Jun 30, 2023
4e926ad
Fix createNewVersion tests
radoslawkrzemien Jun 30, 2023
a8a6900
Fix deploy tests
radoslawkrzemien Jun 30, 2023
34b6ff5
Fix finishReleaseCycle tests
radoslawkrzemien Jun 30, 2023
15f2fba
Fix platformDeploy tests
radoslawkrzemien Jul 3, 2023
7de1fba
Fix preDeploy tests
radoslawkrzemien Jul 3, 2023
c424a8d
Fix test tests
radoslawkrzemien Jul 3, 2023
e0e7a63
Fix typo
radoslawkrzemien Jul 3, 2023
f3865a4
Fix testBuild tests
radoslawkrzemien Jul 3, 2023
a2a05d0
Merge remote-tracking branch 'origin/main' into @radoslawkrzemien/136…
radoslawkrzemien Jul 4, 2023
30609a5
Remove dependency
radoslawkrzemien Jul 12, 2023
c429f0e
Merge remote-tracking branch 'origin/main' into @radoslawkrzemien/136…
radoslawkrzemien Jul 12, 2023
69e43bf
Fix cherryPick.test.js
radoslawkrzemien Jul 12, 2023
6ce1fed
Fix deploy.test.js
radoslawkrzemien Jul 12, 2023
fc12b0f
Fix deployBlocker.test.js
radoslawkrzemien Jul 12, 2023
2518b36
Fix lockDeploys.test.js
radoslawkrzemien Jul 12, 2023
d6c9bac
Fix platformDeploy.test.js
radoslawkrzemien Jul 12, 2023
277a02e
Fix preDeploy.test.js
radoslawkrzemien Jul 12, 2023
629a68f
Fix testBuild.test.js
radoslawkrzemien Jul 12, 2023
deb4faf
Fix validateGithubActions.test.js
radoslawkrzemien Jul 12, 2023
e9a593a
Fix verifyPodfile.test.js
radoslawkrzemien Jul 12, 2023
af57366
Run lint/prettier
radoslawkrzemien Jul 12, 2023
75a9f3e
Increase the timeout
radoslawkrzemien Jul 13, 2023
41e6d57
Check setup before tests
radoslawkrzemien Aug 3, 2023
1f5e336
Fix syntax
radoslawkrzemien Aug 3, 2023
65f3fa0
Merge remote-tracking branch 'origin/main' into @radoslawkrzemien/136…
radoslawkrzemien Aug 4, 2023
a101371
Sync with upstream
radoslawkrzemien Aug 4, 2023
af8618c
Run prettier
radoslawkrzemien Aug 4, 2023
a3d8b76
Pass args
radoslawkrzemien Aug 4, 2023
e7fc13f
Check `.env` file
radoslawkrzemien Aug 7, 2023
5ddfead
Fix typos
radoslawkrzemien Aug 8, 2023
3402577
Merge remote-tracking branch 'origin/main' into @radoslawkrzemien/136…
radoslawkrzemien Aug 9, 2023
8bf77af
Merge from upstream
radoslawkrzemien Aug 9, 2023
8b1511a
Merge remote-tracking branch 'origin/main' into @radoslawkrzemien/136…
radoslawkrzemien Aug 16, 2023
83b995b
Merge from upstream
radoslawkrzemien Aug 16, 2023
ad372bc
Merge from upstream
radoslawkrzemien Aug 16, 2023
e446f13
Merge remote-tracking branch 'origin/main' into @radoslawkrzemien/136…
radoslawkrzemien Aug 21, 2023
4dd43c2
Merge from upstream
radoslawkrzemien Aug 21, 2023
7799937
Merge from upstream
radoslawkrzemien Aug 21, 2023
ffcd370
Update .eslintrc.js
radoslawkrzemien Aug 30, 2023
26bb430
Merge remote-tracking branch 'origin/main' into @radoslawkrzemien/136…
radoslawkrzemien Aug 30, 2023
a995ca8
Merge from upstream
radoslawkrzemien Aug 30, 2023
1a1bb04
Run prettier
radoslawkrzemien Aug 31, 2023
1bb8730
Merge remote-tracking branch 'origin/main' into @radoslawkrzemien/136…
radoslawkrzemien Aug 31, 2023
8ecc604
Merge remote-tracking branch 'origin/main' into @radoslawkrzemien/136…
radoslawkrzemien Sep 12, 2023
7d6f91f
Resolve conflicts
radoslawkrzemien Sep 12, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,5 +163,11 @@ module.exports = {
],
},
},
{
files: ['workflow_tests/**/*.js'],
rules: {
'@lwc/lwc/no-async-await': 'off',
},
},
],
};
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 }}
33 changes: 21 additions & 12 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 }}
Expand All @@ -125,7 +132,8 @@ jobs:
runs-on: ubuntu-latest
needs: [updateStaging, createNewPatchVersion]
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3
with:
ref: staging
token: ${{ secrets.OS_BOTIFY_TOKEN }}
Expand All @@ -143,7 +151,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
NPM_VERSION: ${{ needs.createNewPatchVersion.outputs.NEW_VERSION }}

- 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 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 }}
45 changes: 30 additions & 15 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 @@ -34,11 +35,14 @@ 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

- 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 @@ -105,9 +109,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 @@ -142,11 +148,14 @@ 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

- 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 @@ -228,9 +237,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 @@ -285,7 +296,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 @@ -295,7 +307,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 @@ -355,9 +368,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