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

[No QA] Install desktop node-modules only when building desktop app #56161

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 6 additions & 1 deletion .github/actions/composite/setupNode/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ inputs:
description: "Indicates if node is set up for hybrid app"
required: false
default: 'false'
IS_DESKTOP_BUILD:
description: "Indicates if node is set up for desktop app"
required: false
default: 'false'

outputs:
cache-hit:
Expand Down Expand Up @@ -41,6 +45,7 @@ runs:
key: ${{ runner.os }}-node-modules-${{ hashFiles('Mobile-Expensify/package-lock.json', 'Mobile-Expensify/patches/**') }}

- id: cache-desktop-node-modules
if: inputs.IS_DESKTOP_BUILD == 'true'
uses: actions/cache@v4
with:
path: desktop/node_modules
Expand All @@ -60,7 +65,7 @@ runs:
command: npm ci

- name: Install node packages for desktop submodule
if: steps.cache-desktop-node-modules.outputs.cache-hit != 'true'
if: inputs.IS_DESKTOP_BUILD == 'true' && steps.cache-desktop-node-modules.outputs.cache-hit != 'true'
uses: nick-fields/retry@3f757583fb1b1f940bc8ef4bf4734c8dc02a5847
with:
timeout_minutes: 30
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,8 @@ jobs:

- name: Setup Node
uses: ./.github/actions/composite/setupNode
with:
IS_DESKTOP_BUILD: true

- 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
2 changes: 2 additions & 0 deletions .github/workflows/testBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@ jobs:

- name: Setup Node
uses: ./.github/actions/composite/setupNode
with:
IS_DESKTOP_BUILD: true

- 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