diff --git a/.github/actions/analyze/action.yml b/.github/actions/analyze/action.yml index d3884d3bc22e..e21a0aa7921c 100644 --- a/.github/actions/analyze/action.yml +++ b/.github/actions/analyze/action.yml @@ -124,7 +124,7 @@ runs: TRUSTPILOT_API_KEY: ${{ inputs.TRUSTPILOT_API_KEY }} NODE_OPTIONS: "--max_old_space_size=4096" shell: bash - run: npm run build:prod && npm run analyze:stats && npm run analyze:build + run: npm run build:prod-analyze && npm run analyze:stats && npm run analyze:build - name: Compare report to master id: diff diff --git a/.github/workflows/analyze.yml b/.github/workflows/analyze.yml index 0e88fee58091..cbcd1d69dedf 100644 --- a/.github/workflows/analyze.yml +++ b/.github/workflows/analyze.yml @@ -24,6 +24,12 @@ jobs: uses: "./.github/actions/setup_node" - name: Install dependencies uses: "./.github/actions/npm_install_from_cache" + - name: Restore NX cache + uses: actions/cache/restore@v4 + id: cache-nx + with: + path: .nx + key: nx-cache-${{ hashFiles('nx.json', 'package-lock.json', 'packages/*/package.json') }} - name: Analyze uses: "./.github/actions/analyze" with: diff --git a/package.json b/package.json index 5558f880aa08..cd0389d20d21 100644 --- a/package.json +++ b/package.json @@ -82,6 +82,7 @@ "build:local": "f () { nx run-many --target=build --projects=@deriv/bot-web-ui,@deriv/trader --parallel=2 ;}; f", "build:travis": "nx run-many --projects=@deriv/shared,@deriv/components,@deriv/translations,@deriv/cashier,@deriv/account,@deriv/p2p,@deriv/cfd,@deriv/reports --target=build:travis", "build:prod": "export NODE_ENV=staging && npm run build:all && export NODE_ENV=", + "build:prod-analyze": "export NODE_ENV=staging && npm run build:all-cache && export NODE_ENV=", "build:storybook": "cd packages/components && sb build --output-dir .out", "build:gh-pages": "f () { nx run-many --target=build --projects=@deriv/components,@deriv/p2p && nx run-many --target=build --projects=@deriv/cashier,@deriv/account,@deriv/cfd,@deriv/reports && npm run build:local $1 ;}; f", "check-imports": "node ./scripts/check-imports.js",