forked from deriv-com/deriv-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: analyze swallows errors, so this splits it out into a different …
…script (deriv-com#14978)
- Loading branch information
1 parent
04c733b
commit ddb7f21
Showing
18 changed files
with
179 additions
and
1,148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
name: analyze | ||
description: Analyze all packages | ||
inputs: | ||
REF_NAME: | ||
description: 'Git ref name' | ||
required: true | ||
default: 'test' | ||
NODE_ENV: | ||
description: 'Node environment' | ||
required: false | ||
default: 'test' | ||
CROWDIN_WALLETS_API_KEY: | ||
description: 'Crowdin wallets api key' | ||
required: false | ||
DATADOG_CLIENT_TOKEN: | ||
description: 'Datadog client token' | ||
required: false | ||
DATADOG_APPLICATION_ID: | ||
description: 'Datadog application id' | ||
required: false | ||
DATADOG_CLIENT_TOKEN_LOGS: | ||
description: 'Datadog client token for logs' | ||
required: false | ||
DATADOG_SESSION_REPLAY_SAMPLE_RATE: | ||
description: 'Datadog session replay sample rate' | ||
required: false | ||
DATADOG_SESSION_SAMPLE_RATE: | ||
description: 'Datadog session sample rate' | ||
required: false | ||
GD_API_KEY: | ||
description: 'Google drive api key' | ||
required: false | ||
GD_APP_ID: | ||
description: 'Google drive app id' | ||
required: false | ||
GD_CLIENT_ID: | ||
description: 'Google drive client id' | ||
required: false | ||
RUDDERSTACK_KEY: | ||
description: 'Rudderstack key' | ||
required: false | ||
GROWTHBOOK_CLIENT_KEY: | ||
description: 'Growthbook key' | ||
required: false | ||
GROWTHBOOK_DECRYPTION_KEY: | ||
description: 'Growthbook decryption key' | ||
required: false | ||
DATADOG_SESSION_SAMPLE_RATE_LOGS: | ||
description: 'Datadog session sample rate for logs' | ||
required: false | ||
REMOTE_CONFIG_URL: | ||
description: 'Remote config backup URL' | ||
required: true | ||
IS_GROWTHBOOK_ENABLED: | ||
description: 'Is growthbook enabled' | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Analyze all packages | ||
env: | ||
NODE_ENV: ${{ inputs.NODE_ENV }} | ||
CROWDIN_WALLETS_API_KEY: ${{ inputs.CROWDIN_WALLETS_API_KEY }} | ||
DATADOG_APPLICATION_ID: ${{ inputs.DATADOG_APPLICATION_ID }} | ||
DATADOG_CLIENT_TOKEN: ${{ inputs.DATADOG_CLIENT_TOKEN }} | ||
DATADOG_CLIENT_TOKEN_LOGS: ${{ inputs.DATADOG_CLIENT_TOKEN_LOGS }} | ||
DATADOG_SESSION_REPLAY_SAMPLE_RATE: ${{ inputs.DATADOG_SESSION_REPLAY_SAMPLE_RATE }} | ||
DATADOG_SESSION_SAMPLE_RATE: ${{ inputs.DATADOG_SESSION_SAMPLE_RATE }} | ||
DATADOG_SESSION_SAMPLE_RATE_LOGS: ${{ inputs.DATADOG_SESSION_SAMPLE_RATE_LOGS }} | ||
IS_GROWTHBOOK_ENABLED: ${{ inputs.IS_GROWTHBOOK_ENABLED }} | ||
GD_API_KEY: ${{ inputs.GD_API_KEY }} | ||
GD_APP_ID: ${{ inputs.GD_APP_ID }} | ||
GD_CLIENT_ID: ${{ inputs.GD_CLIENT_ID }} | ||
RUDDERSTACK_KEY: ${{ inputs.RUDDERSTACK_KEY }} | ||
GROWTHBOOK_CLIENT_KEY: ${{ inputs.GROWTHBOOK_CLIENT_KEY }} | ||
GROWTHBOOK_DECRYPTION_KEY: ${{ inputs.GROWTHBOOK_DECRYPTION_KEY }} | ||
REF_NAME: ${{ inputs.REF_NAME }} | ||
REMOTE_CONFIG_URL: ${{ inputs.REMOTE_CONFIG_URL }} | ||
NODE_OPTIONS: "--max_old_space_size=4096" | ||
run: npm run build:prod && npm run analyze:stats | ||
shell: bash | ||
|
||
- name: Zip all stats.json files | ||
run: | | ||
zip -r stats.zip packages/*/stats.json | ||
shell: bash | ||
|
||
- name: Upload stats.zip | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: stats-${{ github.sha }} | ||
path: stats.zip | ||
retention-days: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Analyse Bundle | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build_and_test: | ||
name: Analyze Bundle | ||
runs-on: Runner_16cores_Deriv-app | ||
environment: Preview | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | ||
- name: Setup Node | ||
uses: "./.github/actions/setup_node" | ||
- name: Install dependencies | ||
uses: "./.github/actions/npm_install_from_cache" | ||
- name: Analyze | ||
uses: "./.github/actions/analyze" | ||
with: | ||
NODE_ENV: production | ||
CROWDIN_WALLETS_API_KEY: ${{ secrets.CROWDIN_WALLETS_API_KEY }} | ||
DATADOG_APPLICATION_ID: ${{ vars.DATADOG_APPLICATION_ID }} | ||
IS_GROWTHBOOK_ENABLED: ${{ vars.IS_GROWTHBOOK_ENABLED }} | ||
DATADOG_CLIENT_TOKEN: ${{ vars.DATADOG_CLIENT_TOKEN }} | ||
DATADOG_CLIENT_TOKEN_LOGS: ${{ vars.DATADOG_CLIENT_TOKEN_LOGS }} | ||
DATADOG_SESSION_REPLAY_SAMPLE_RATE: ${{ vars.DATADOG_SESSION_REPLAY_SAMPLE_RATE }} | ||
DATADOG_SESSION_SAMPLE_RATE: ${{ vars.DATADOG_SESSION_SAMPLE_RATE }} | ||
DATADOG_SESSION_SAMPLE_RATE_LOGS: ${{ vars.DATADOG_SESSION_SAMPLE_RATE_LOGS }} | ||
GD_API_KEY: ${{ secrets.GD_API_KEY }} | ||
GD_APP_ID: ${{ secrets.GD_APP_ID }} | ||
GD_CLIENT_ID: ${{ secrets.GD_CLIENT_ID }} | ||
RUDDERSTACK_KEY: ${{ vars.RUDDERSTACK_KEY }} | ||
GROWTHBOOK_CLIENT_KEY: ${{ vars.GROWTHBOOK_CLIENT_KEY }} | ||
GROWTHBOOK_DECRYPTION_KEY: ${{ vars.GROWTHBOOK_DECRYPTION_KEY }} | ||
REF_NAME: ${{ github.ref_name }} | ||
REMOTE_CONFIG_URL: ${{ vars.REMOTE_CONFIG_URL }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.