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

ci: update the workflows #48

Closed
wants to merge 66 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
381d126
fix: issue with routing to deposit page on any tab selection in cashi…
nada-deriv Aug 10, 2023
77e54bf
translations: 📚 sync translations with crowdin (#9656)
github-actions[bot] Aug 10, 2023
5c5d382
fix: limit order (#9655)
maryia-deriv Aug 10, 2023
52bbc7b
Kate / WEBREL-50 / Tests for trade-modals.jsx in Trader package (#9155)
kate-deriv Aug 10, 2023
5b6816b
Kate / WEBREL-40 / Test coverage: MarketUnavailableModal + Unsupport…
kate-deriv Aug 10, 2023
53420f8
henry/test: ts migration and test coverage for ServicesErrorModal fol…
henry-deriv Aug 10, 2023
5995349
feat: :white_check_mark: Adding disclaimer on Sign up page when the u…
shaheer-deriv Aug 10, 2023
f70fadb
Prince/ updated slack webhook URL (#9661)
prince-deriv Aug 10, 2023
10295fc
Revert "Prince/ updated slack webhook URL (#9661)" (#9665)
vinu-deriv Aug 10, 2023
07aad0f
ci: update the workflows
ali-hosseini-deriv Aug 11, 2023
440be0a
translations: 📚 sync translations with crowdin (#9672)
github-actions[bot] Aug 15, 2023
cfacd85
chore: translation workflow trigger (#9684)
prince-deriv Aug 15, 2023
bd70a37
Revert "chore: translation workflow trigger (#9684)" (#9686)
sandeep-deriv Aug 15, 2023
3196e06
Kate / WEBREL-51 / Test coverage: ProgressSliderStream in Trader pack…
kate-deriv Aug 15, 2023
c31777a
Kate / Test coverage: ChartLoader + Loading in Trader package (#8398)
kate-deriv Aug 15, 2023
62fc7ee
likhith/fix: :bug: display onfido error message (#9401)
likhith-deriv Aug 15, 2023
ba2e6fd
Henry/fix: test coverage and ts migration for asset/trading/categorie…
henry-deriv Aug 15, 2023
8b90802
Matin/WALL-1308/Adding Korean language (#9426)
matin-deriv Aug 15, 2023
3133e6f
Amina/fix: disable account when proof failed (#9555)
amina-deriv Aug 15, 2023
ea0d9cc
fix: duplicate_types (#9691)
amina-deriv Aug 15, 2023
9d4ba1d
likhith/fix: :bug: translation of IDV documents dropdown option (#9336)
likhith-deriv Aug 15, 2023
62b9ac2
maryia/DTRA-350/feat: handle displayed positions locally in TogglePos…
maryia-deriv Aug 15, 2023
84b6778
FarhanNurzi/P2PS-1417/2FA order confirm modal is not showing up on mo…
farhan-nurzi-deriv Aug 15, 2023
f024924
Adrienne / Implemented new navigation flow for filtering payment meth…
adrienne-deriv Aug 15, 2023
b86a254
Amina/wall 575/maintenance notifications for site and cashier (#9064)
amina-deriv Aug 15, 2023
44319aa
Shaheer/wall 1229 (#9240)
shaheer-deriv Aug 15, 2023
f85083c
Kate / OPT-306 / Update Accumulator to Accumulators (#9577)
kate-deriv Aug 15, 2023
ea42eda
Kate / Add video for Vanillas description (#9622)
kate-deriv Aug 15, 2023
0107135
likhith/chore: incorporated the API response to save the opt-out user…
likhith-deriv Aug 15, 2023
2fbc0af
translations: 📚 sync translations with crowdin (#9702)
github-actions[bot] Aug 15, 2023
2a67dbd
Matin / Remove ESLint Ignore (#9707)
matin-deriv Aug 16, 2023
aba9a9f
translations: 📚 sync translations with crowdin (#9709)
github-actions[bot] Aug 16, 2023
858661c
fix: set dbot as external in platform config for authorize logout iss…
shafin-deriv Aug 16, 2023
13426cc
feat: transaction details modal (#9032)
shafin-deriv Aug 16, 2023
a4b0926
fix: gtm issue (#9551)
shafin-deriv Aug 16, 2023
d1ec19f
fix: registration flow in buy/sell tab (#9573)
nada-deriv Aug 16, 2023
0377e58
Farzin/WALL-460/DepositCrypto module (#8867)
farzin-deriv Aug 16, 2023
3d48bec
fix: fix quick add modal's height bug (#8574)
farhan-nurzi-deriv Aug 16, 2023
c5d47d9
Farabi/bot 296/update responsive of tour in light mode (#9315)
farabi-deriv Aug 16, 2023
c71ffd0
Maryia/Bot-303/feat: add crash/boom to markets list (#9098)
maryia-matskevich-deriv Aug 16, 2023
53e6215
Kate / DTRA-166 / Implement Contract pages for Ends/ Stays contracts …
kate-deriv Aug 16, 2023
72aa799
Henry/dtra 282/rewrite contract type info component (#9352)
henry-deriv Aug 16, 2023
06fa325
farabi/bot-228/fix-step-5-modal-alignment (#9377)
farabi-deriv Aug 16, 2023
339b676
Niloofar Sadeghi / useP2PAdvertList custom hook (#9704)
niloofar-deriv Aug 16, 2023
baae193
chore: test case for dbot-providers (#9583)
shafin-deriv Aug 16, 2023
ea8565a
henry/test: add test coverage and ts migration for successdialog (#8432)
henry-deriv Aug 16, 2023
2a72c07
test: :white_check_mark: add test case for Audio component (#9572)
vinu-deriv Aug 16, 2023
736c061
translations: 📚 sync translations with crowdin (#9730)
github-actions[bot] Aug 16, 2023
7885480
chore: fixed orders failing test case (#9735)
ameerul-deriv Aug 17, 2023
ae067f2
translations: 📚 sync translations with crowdin (#9741)
github-actions[bot] Aug 17, 2023
810081f
chore: update code owners (#9678)
maryia-deriv Aug 17, 2023
fbf3cba
ci: extract action from workflow
ali-hosseini-deriv Aug 18, 2023
61cb590
ci: move checkout to workflow
ali-hosseini-deriv Aug 18, 2023
e754fb5
ci: add on pull request
ali-hosseini-deriv Aug 18, 2023
d5483d5
ci: add checkout to coveralls
ali-hosseini-deriv Aug 18, 2023
08a8ca7
ci: update workflow path
ali-hosseini-deriv Aug 18, 2023
5d56844
ci: move action to its own folder
ali-hosseini-deriv Aug 18, 2023
4df0b22
ci: add using prop
ali-hosseini-deriv Aug 18, 2023
81b29fb
ci: add shell prop
ali-hosseini-deriv Aug 18, 2023
da6329a
ci: update coveralls
ali-hosseini-deriv Aug 18, 2023
6ad6607
fix(cashier): :bug: fix unable to access CFD-DerivX transfer (#9745)
farzin-deriv Aug 18, 2023
c7b8403
Merge branch 'master' of https://github.com/binary-com/deriv-app into…
ali-hosseini-deriv Aug 18, 2023
b43a034
ci: move back coveralls
ali-hosseini-deriv Aug 18, 2023
fb991b5
ci: remove extra steps and jobs
ali-hosseini-deriv Aug 18, 2023
717764b
build: update jest max-worker
ali-hosseini-deriv Aug 19, 2023
a187c92
ci: update max workers variable
ali-hosseini-deriv Aug 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 7 additions & 7 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
# deriv-app/account
# ==============================================================

/packages/account/**/* @matin-deriv @amina-deriv
/packages/account/**/* @matin-deriv @amina-deriv @maryia-deriv


# ==============================================================
Expand Down Expand Up @@ -118,13 +118,13 @@
# ==============================================================

/packages/api/**/* @ali-hosseini-deriv @matin-deriv
/packages/core/**/* @ali-hosseini-deriv @matin-deriv
/packages/shared/**/* @ali-hosseini-deriv @matin-deriv
/packages/components/**/* @ali-hosseini-deriv @matin-deriv
/packages/translations/**/* @ali-hosseini-deriv @matin-deriv
/packages/utils/**/* @ali-hosseini-deriv @matin-deriv
/packages/core/**/* @ali-hosseini-deriv @matin-deriv @maryia-deriv
/packages/shared/**/* @ali-hosseini-deriv @matin-deriv @maryia-deriv
/packages/components/**/* @ali-hosseini-deriv @matin-deriv @maryia-deriv
/packages/translations/**/* @ali-hosseini-deriv @matin-deriv @maryia-deriv
/packages/utils/**/* @ali-hosseini-deriv @matin-deriv @maryia-deriv
/packages/hooks/**/* @ali-hosseini-deriv @matin-deriv
/packages/stores/**/* @ali-hosseini-deriv @matin-deriv
/packages/stores/**/* @ali-hosseini-deriv @matin-deriv @maryia-deriv


# ==============================================================
Expand Down
103 changes: 103 additions & 0 deletions .github/actions/build-and-test/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@

name: Build and Test
description: Install, bootstrap, Build and Test


runs:
using: composite


steps:

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: package-lock.json


- name: Setup Docker
uses: docker/setup-buildx-action@v2

- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: |
- "node_modules"
- "packages/account/node_modules"
- "packages/api/node_modules"
- "packages/appstore/node_modules"
- "packages/bot-skeleton/node_modules"
- "packages/bot-web-ui/node_modules"
- "packages/cashier/node_modules"
- "packages/components/node_modules"
- "packages/core/node_modules"
- "packages/hooks/node_modules"
- "packages/cfd/node_modules"
- "packages/indicators/node_modules"
- "packages/p2p/node_modules"
- "packages/reports/node_modules"
- "packages/shared/node_modules"
- "packages/stores/node_modules"
- "packages/trader/node_modules"
- "packages/translations/node_modules"
- "packages/utils/node_modules"
- "packages/analytics/node_modules"

key: node_modules-${{ hashFiles('**/package-lock.json') }}

- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
name: List the state of node modules
continue-on-error: true
shell: bash -le {0}

run: |
npm ci
npm run bootstrap

- name: Build
shell: bash -le {0}
run: npm run build:all

- name: "Check TypeScript for @deriv/api"
shell: bash -le {0}
run: npx tsc --project packages/api/tsconfig.json -noEmit

- name: "Check TypeScript for @deriv/hooks"
shell: bash -le {0}
run: npx tsc --project packages/hooks/tsconfig.json -noEmit

- name: "Check TypeScript for @deriv/utils"
shell: bash -le {0}
run: npx tsc --project packages/utils/tsconfig.json -noEmit

- name: "Check TypeScript for @deriv/analytics"
shell: bash -le {0}
run: npx tsc --project packages/analytics/tsconfig.json -noEmit

- name: "Check TypeScript for @deriv/stores"
shell: bash -le {0}
run: npx tsc --project packages/stores/tsconfig.json -noEmit

- name: "Check tests for @deriv/hooks"
shell: bash -le {0}
run: bash ./scripts/check-tests.sh packages/hooks/src

- name: "Check tests for @deriv/utils"
shell: bash -le {0}
run: bash ./scripts/check-tests.sh packages/utils/src

- name: "Check tests for @deriv/analytics"
shell: bash -le {0}
run: bash ./scripts/check-tests.sh packages/analytics/src

- name: "Run tests"
shell: bash -le {0}
run: JEST_MAX_WORKERS=4 npm test


60 changes: 60 additions & 0 deletions .github/workflows/build-and-deploy-staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Build and Deploy

on:
push:
branches:
- master

jobs:
build_and_deploy:
# runs-on: [self-hosted] # Specify the label of your self-hosted runner machine

steps:
- name: Build and Test
uses: ./.github/actions/build-and-test

- name: Tag and Version
run: |
echo "${{ github.event_name }}"
if [ "${{ github.event_name }}" == "release" ]; then
echo "::set-output name=version_name::production-${{ github.ref }}"
else
echo "::set-output name=version_name::staging-${{ github.sha }}"
fi

- name: Build and Push image to docker hub
env:
DOCKHUB_ORGANISATION: binary-com # Set your Docker Hub organization
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
run: |
TAG=${{ github.event.outputs.version_name }}
docker build -t $DOCKHUB_ORGANISATION/deriv-app:${TAG} -t $DOCKHUB_ORGANISATION/deriv-app:latest-staging -f Dockerfile .
echo $DOCKERHUB_PASSWORD | docker login -u $DOCKERHUB_USERNAME --password-stdin
docker push $DOCKHUB_ORGANISATION/deriv-app:${TAG}
docker push $DOCKHUB_ORGANISATION/deriv-app:latest-staging

- name: Deploy to k8s cluster
env:
CA_CRT: ${{ secrets.CA_CRT }} # Add your Kubernetes CA_CRT secret here
run: |
TAG=${{ github.event.outputs.version_name }}
git clone https://github.com/binary-com/devops-ci-scripts
cd devops-ci-scripts/k8s-build_tools
echo $CA_CRT | base64 --decode > ca.crt
./release.sh deriv-app ${TAG} "deriv-app-staging" # Adjust parameters as needed

- name: Notify slack
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} # Add your Slack Webhook secret here
run: |
TAG=${{ github.event.outputs.version_name }}
if [ "${{ github.event_name }}" == "release" ]; then
slack/status \
--failure-message "Release failed for app.deriv.com with version *${TAG}*" \
--success-message "Release succeeded for app.deriv.com with version *${TAG}*" \
--webhook "${SLACK_WEBHOOK}"
fi

# Add the steps for publishing to Cloudflare Pages here if needed.

17 changes: 17 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Build and Test

on:
pull_request:
branches:
- master

jobs:
build_and_deploy:
# runs-on: [self-hosted] # Specify the label of your self-hosted runner machine
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Build and Test
uses: ./.github/actions/build-and-test
22 changes: 7 additions & 15 deletions .github/workflows/coveralls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,15 @@ name: Coveralls

jobs:

build:
name: Reporter
Reporter:
name: Upload Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2

- uses: actions/checkout@v3

- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Bootstrap, Build, and make test-coverage
run: |
npm ci
npm run bootstrap
npm run build:all
JEST_MAX_WORKERS=3 npm run test:jest
- name: Build and Test
uses: ./.github/actions/build-and-test

- name: Coveralls
uses: coverallsapp/github-action@v2
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"publish_package": "f () { lerna exec --scope=@deriv/${1:-'*'} -- npm run publish_package $2 ;}; f",
"serve": "f () { lerna exec --scope=@deriv/${1:-'*'} -- npm run serve $npm_config_open;}; f",
"start": "f () { lerna exec --scope=@deriv/${1:-'*'} -- npm run start ;}; f",
"test": "f () { bash ./scripts/circleci-config.test.sh && npm run test:stylelint && npm run test:eslint-all && JEST_MAX_WORKERS=6 npm run test:jest ;}; f",
"test": "f () { bash ./scripts/circleci-config.test.sh && npm run test:stylelint && npm run test:eslint-all && JEST_MAX_WORKERS=${JEST_MAX_WORKERS:-'45%'} npm run test:jest ;}; f",
"test:stylelint": "stylelint \"./packages/*/src/**/*.s(a|c)ss\"",
"test:jest": "jest --all --maxWorkers=${JEST_MAX_WORKERS:-'45%'}",
"test:e2e": "cd end-to-end-test && npx playwright test",
Expand Down
4 changes: 2 additions & 2 deletions packages/account/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
},
"dependencies": {
"@binary-com/binary-document-uploader": "^2.4.8",
"@deriv/api-types": "^1.0.94",
"@deriv/api-types": "^1.0.116",
"@deriv/components": "^1.0.0",
"@deriv/hooks": "^1.0.0",
"@deriv/shared": "^1.0.0",
"@deriv/stores":"^1.0.0",
"@deriv/stores": "^1.0.0",
"@deriv/translations": "^1.0.0",
"bowser": "^2.9.0",
"classnames": "^2.2.6",
Expand Down
3 changes: 3 additions & 0 deletions packages/account/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ const App = ({ passthrough }: TAppProps) => {
const { root_store, WS } = passthrough;
setWebsocket(WS);

const { notification_messages_ui: Notifications } = root_store.ui;

return (
<StoreProvider store={root_store}>
{Notifications && <Notifications />}
<Routes />
<ResetTradingPassword />
</StoreProvider>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import PropTypes from 'prop-types';
import * as React from 'react';
import { StaticUrl } from '@deriv/components';
import { Localize, localize } from '@deriv/translations';
Expand Down Expand Up @@ -29,8 +28,4 @@ const AccountLimitsArticle = ({ is_from_derivgo }: TAccountLimitsArticle) => {
return <AccountArticle title={localize('Account limits')} descriptions={getDescription()} />;
};

AccountLimitsArticle.propTypes = {
is_from_derivgo: PropTypes.bool,
};

export default AccountLimitsArticle;
Loading
Loading