From 049d0ae40000d14160d61b2486094442eac01a9c Mon Sep 17 00:00:00 2001 From: Jim Daniels Wasswa Date: Fri, 7 Jun 2024 14:58:49 +0800 Subject: [PATCH] test: test --- .github/workflows/analyze.yml | 94 ++++++++++---------- .github/workflows/coveralls.yml | 48 +++++----- .github/workflows/dependency_review.yml | 38 ++++---- .github/workflows/test.yml | 112 ++++++++++++------------ 4 files changed, 146 insertions(+), 146 deletions(-) diff --git a/.github/workflows/analyze.yml b/.github/workflows/analyze.yml index 0e88fee58091..a4041d0f1eb1 100644 --- a/.github/workflows/analyze.yml +++ b/.github/workflows/analyze.yml @@ -1,49 +1,49 @@ -name: Analyse Bundle -on: - pull_request: - branches: - - master - push: - branches: - - master +# 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 - permissions: - contents: read - pull-requests: write - actions: read - 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 }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - 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 }} - ISSUE_NUMBER: ${{ github.event.pull_request.number }} - TRUSTPILOT_API_KEY: ${{ secrets.TRUSTPILOT_API_KEY }} +# jobs: +# build_and_test: +# name: Analyze Bundle +# runs-on: Runner_16cores_Deriv-app +# environment: Preview +# permissions: +# contents: read +# pull-requests: write +# actions: read +# 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 }} +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# 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 }} +# ISSUE_NUMBER: ${{ github.event.pull_request.number }} +# TRUSTPILOT_API_KEY: ${{ secrets.TRUSTPILOT_API_KEY }} diff --git a/.github/workflows/coveralls.yml b/.github/workflows/coveralls.yml index 0d212094bfdb..21c83749a893 100644 --- a/.github/workflows/coveralls.yml +++ b/.github/workflows/coveralls.yml @@ -1,24 +1,24 @@ -on: - push: - branches: - - master - pull_request: - types: [opened, synchronize, edited] -name: Coveralls -jobs: - build: - name: Reporter - runs-on: Runner_8cores_Deriv-app - 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: Build - uses: "./.github/actions/build" - - name: Test - run: JEST_MAX_WORKERS=95% npm run test:jest -- --collectCoverage - - name: Coveralls - uses: coverallsapp/github-action@3dfc5567390f6fa9267c0ee9c251e4c8c3f18949 +# on: +# push: +# branches: +# - master +# pull_request: +# types: [opened, synchronize, edited] +# name: Coveralls +# jobs: +# build: +# name: Reporter +# runs-on: Runner_8cores_Deriv-app +# 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: Build +# uses: "./.github/actions/build" +# - name: Test +# run: JEST_MAX_WORKERS=95% npm run test:jest -- --collectCoverage +# - name: Coveralls +# uses: coverallsapp/github-action@3dfc5567390f6fa9267c0ee9c251e4c8c3f18949 diff --git a/.github/workflows/dependency_review.yml b/.github/workflows/dependency_review.yml index 545fe3a53bf4..805b16e0c4b2 100644 --- a/.github/workflows/dependency_review.yml +++ b/.github/workflows/dependency_review.yml @@ -1,19 +1,19 @@ -name: Deriv-app Dependency Review -on: - pull_request: - branches: - - master -jobs: - dependency_review: - runs-on: ubuntu-latest - permissions: - contents: read - pull-requests: write - steps: - - name: Checkout Repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - - name: Dependency Review - uses: actions/dependency-review-action@5bbc3ba658137598168acb2ab73b21c432dd411b - with: - comment-summary-in-pr: on-failure - repo-token: ${{ secrets.GITHUB_TOKEN }} +# name: Deriv-app Dependency Review +# on: +# pull_request: +# branches: +# - master +# jobs: +# dependency_review: +# runs-on: ubuntu-latest +# permissions: +# contents: read +# pull-requests: write +# steps: +# - name: Checkout Repository +# uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 +# - name: Dependency Review +# uses: actions/dependency-review-action@5bbc3ba658137598168acb2ab73b21c432dd411b +# with: +# comment-summary-in-pr: on-failure +# repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1d9c48806b34..be7188ac5efa 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,57 +1,57 @@ -name: Deriv App PR Test Workflow -on: - pull_request: - branches: - - master +# name: Deriv App PR Test Workflow +# on: +# pull_request: +# branches: +# - master -jobs: - build_and_test: - name: Build And Test - runs-on: Runner_8cores_Deriv-app - environment: Preview - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - - name: Setup Node - uses: "./.github/actions/setup_node" - - name: Check imports - run: npm run check-imports - - name: Install dependencies - uses: "./.github/actions/npm_install_from_cache" - # - name: Invalidate NPM Cache - # if: github.event_name == 'push' && github.ref == 'refs/heads/master' - # uses: "./.github/actions/invalidate_npm_cache" - - name: Build - uses: "./.github/actions/build" - - name: Check TypeScript for @deriv/api - run: npx tsc --project packages/api/tsconfig.json -noEmit - - name: Check TypeScript for @deriv/api-v2 - run: npx tsc --project packages/api-v2/tsconfig.json -noEmit - - name: Check TypeScript for @deriv/hooks - run: npx tsc --project packages/hooks/tsconfig.json -noEmit - - name: Check TypeScript for @deriv/utils - run: npx tsc --project packages/utils/tsconfig.json -noEmit - - name: Check TypeScript for @deriv/stores - run: npx tsc --project packages/stores/tsconfig.json -noEmit - - name: Check TypeScript for @deriv/wallets - run: npx tsc --project packages/wallets/tsconfig.json -noEmit - - name: Check TypeScript for @deriv/tradershub - run: npx tsc --project packages/tradershub/tsconfig.json -noEmit - - name: Check TypeScript for @deriv/cashier-v2 - run: npx tsc --project packages/cashier-v2/tsconfig.json -noEmit - - name: Check ESLint for @deriv/wallets - run: npx eslint --fix --ignore-path packages/wallets/.eslintignore --config packages/wallets/.eslintrc.js packages/wallets - - name: Check ESLint for @deriv/tradershub - run: npx eslint --fix --ignore-path packages/tradershub/.eslintignore --config packages/tradershub/.eslintrc.js packages/tradershub - - name: Check ESLint for @deriv/cashier-v2 - run: npx eslint --fix --ignore-path packages/cashier-v2/.eslintignore --config packages/cashier-v2/.eslintrc.js packages/cashier-v2 - - name: Check Stylelint for @deriv/wallets - run: npx stylelint packages/wallets/**/*.scss - - name: Check Stylelint for @deriv/cashier-v2 - run: npx stylelint packages/cashier-v2/**/*.scss - - name: Check tests for @deriv/hooks - run: bash ./scripts/check-tests.sh packages/hooks/src - - name: Check tests for @deriv/utils - run: bash ./scripts/check-tests.sh packages/utils/src - - name: Run tests - run: npm run test:ci +# jobs: +# build_and_test: +# name: Build And Test +# runs-on: Runner_8cores_Deriv-app +# environment: Preview +# steps: +# - name: Checkout +# uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 +# - name: Setup Node +# uses: "./.github/actions/setup_node" +# - name: Check imports +# run: npm run check-imports +# - name: Install dependencies +# uses: "./.github/actions/npm_install_from_cache" +# # - name: Invalidate NPM Cache +# # if: github.event_name == 'push' && github.ref == 'refs/heads/master' +# # uses: "./.github/actions/invalidate_npm_cache" +# - name: Build +# uses: "./.github/actions/build" +# - name: Check TypeScript for @deriv/api +# run: npx tsc --project packages/api/tsconfig.json -noEmit +# - name: Check TypeScript for @deriv/api-v2 +# run: npx tsc --project packages/api-v2/tsconfig.json -noEmit +# - name: Check TypeScript for @deriv/hooks +# run: npx tsc --project packages/hooks/tsconfig.json -noEmit +# - name: Check TypeScript for @deriv/utils +# run: npx tsc --project packages/utils/tsconfig.json -noEmit +# - name: Check TypeScript for @deriv/stores +# run: npx tsc --project packages/stores/tsconfig.json -noEmit +# - name: Check TypeScript for @deriv/wallets +# run: npx tsc --project packages/wallets/tsconfig.json -noEmit +# - name: Check TypeScript for @deriv/tradershub +# run: npx tsc --project packages/tradershub/tsconfig.json -noEmit +# - name: Check TypeScript for @deriv/cashier-v2 +# run: npx tsc --project packages/cashier-v2/tsconfig.json -noEmit +# - name: Check ESLint for @deriv/wallets +# run: npx eslint --fix --ignore-path packages/wallets/.eslintignore --config packages/wallets/.eslintrc.js packages/wallets +# - name: Check ESLint for @deriv/tradershub +# run: npx eslint --fix --ignore-path packages/tradershub/.eslintignore --config packages/tradershub/.eslintrc.js packages/tradershub +# - name: Check ESLint for @deriv/cashier-v2 +# run: npx eslint --fix --ignore-path packages/cashier-v2/.eslintignore --config packages/cashier-v2/.eslintrc.js packages/cashier-v2 +# - name: Check Stylelint for @deriv/wallets +# run: npx stylelint packages/wallets/**/*.scss +# - name: Check Stylelint for @deriv/cashier-v2 +# run: npx stylelint packages/cashier-v2/**/*.scss +# - name: Check tests for @deriv/hooks +# run: bash ./scripts/check-tests.sh packages/hooks/src +# - name: Check tests for @deriv/utils +# run: bash ./scripts/check-tests.sh packages/utils/src +# - name: Run tests +# run: npm run test:ci