Skip to content

Commit c7e42ff

Browse files
chore: resolved conflicta and updated with master
2 parents c3715ac + 6966640 commit c7e42ff

File tree

1,489 files changed

+11723
-47257
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,489 files changed

+11723
-47257
lines changed

.github/workflows/smoketests.yml

Lines changed: 31 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -11,123 +11,48 @@ permissions:
1111
on:
1212
issue_comment:
1313
types: [edited]
14-
14+
1515
jobs:
16-
cypress-run:
16+
trigger-workflow:
1717
runs-on: ubuntu-latest
18-
strategy:
19-
fail-fast: false
20-
matrix:
21-
containers: [1,2]
22-
2318
steps:
2419
- name: Capture Vercel preview URL
2520
id: vercel_preview_url
2621
uses: binary-com/vercel-preview-url-action@v1.0.5
2722
with:
2823
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2924

30-
- name: Checkout external repository with Cypress tests
31-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
32-
with:
33-
repository: deriv-com/e2e-deriv-app
34-
35-
- name: Cypress run
36-
# Uses the official Cypress GitHub action https://github.com/cypress-io/github-action
37-
if: ${{ github.event.issue.draft == false && contains(github.event.issue.labels.*.name, 'Wallets') }}
38-
uses: cypress-io/github-action@97d526c9027e1b1eedde4f37196aebe8834005ef
39-
with:
40-
# Records to Cypress Cloud
41-
# https://docs.cypress.io/guides/cloud/projects#Set-up-a-project-to-record
42-
record: true
43-
parallel: true # Runs test in parallel using settings above
44-
spec: cypress/e2e/smoke/Wallets/*.cy.js
45-
group: 'Smoke Tests'
46-
47-
env:
48-
# For recording and parallelization to work you must set your CYPRESS_RECORD_KEY
49-
# in GitHub repo → Settings → Secrets → Actions
50-
CYPRESS_RECORD_KEY: ${{ secrets.E2E_CYPRESS_RECORD_KEY }}
51-
# Creating a token https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
52-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53-
# Set Base Url from client_payload.
54-
CYPRESS_BASE_URL: https://staging-app.deriv.com/
55-
# Send PR details to Cypress test run
56-
COMMIT_INFO_MESSAGE: PR "${{ github.event.issue.number }}" Changed By "${{ github.event.issue.user.login }}" in Labels "${join(github.event.issue.labels.*.name, ', ')}" (draft? "${{ github.event.issue.draft }}")
57-
58-
# Set login env variables
59-
E2E_OAUTH_URL: ${{ secrets.E2E_OAUTH_URL }}
60-
E2E_CONFIG_APPID: ${{ secrets.E2E_CONFIG_APPID }}
61-
E2E_CONFIG_SERVER: ${{ secrets.E2E_CONFIG_SERVER }}
62-
E2E_MT5_LOGIN: ${{ secrets.E2E_MT5_LOGIN }}
63-
E2E_MT5_PASSWORD: ${{ secrets.E2E_MT5_PASSWORD }}
64-
E2E_MT5_BASEURL: ${{ secrets.E2E_MT5_BASEURL }}
65-
E2E_STD_CONFIG_SERVER: ${{ env.QA_SERVER || secrets.E2E_STD_CONFIG_SERVER }}
66-
E2E_STD_CONFIG_APPID: ${{ github.event.inputs.appid || secrets.E2E_STD_CONFIG_APPID }}
67-
E2E_DOUGHFLOW_CONFIG_SERVER: ${{ secrets.E2E_DOUGHFLOW_CONFIG_SERVER }}
68-
E2E_DOUGHFLOW_CONFIG_APPID: ${{ secrets.E2E_DOUGHFLOW_CONFIG_APPID }}
69-
E2E_QABOX_URL: ${{ secrets.E2E_QABOX_URL }}
70-
E2E_MAIN_QABOX_URL: ${{ secrets.E2E_MAIN_QABOX_URL }}
71-
E2E_QABOX_LOGIN: ${{ secrets.E2E_QABOX_LOGIN }}
72-
E2E_QABOX_PASSWORD: ${{ secrets.E2E_QABOX_PASSWORD }}
73-
TEST_SUITE: ${{ github.event.inputs.suite }}
74-
E2E_DERIV_LOGIN_PROD: ${{secrets.E2E_DERIV_LOGIN_PROD}}
75-
E2E_DERIV_PASSWORD_PROD: ${{secrets.E2E_DERIV_PASSWORD_PROD }}
76-
E2E_PROD_SERVER: ${{secrets.E2E_PROD_SERVER}}
77-
E2E_PROD_APPID: ${{secrets.E2E_PROD_APPID}}
78-
E2E_LOGIN_ID_P2P_FIXEDRATE: ${{ secrets.E2E_LOGIN_ID_P2P_FIXEDRATE }}
79-
E2E_P2P_FLOATING: ${{secrets.E2E_P2P_FLOATING}}
80-
E2E_LOGIN_ID_P2P_STANDARDACCOUNTWITHADS: ${{secrets.E2E_LOGIN_ID_P2P_STANDARDACCOUNTWITHADS}}
81-
E2E_LOGIN_ID_P2P_STANDARDACCOUNTWITHOUTADS: ${{secrets.E2E_LOGIN_ID_P2P_STANDARDACCOUNTWITHOUTADS}}
82-
E2E_LOGIN_ID_P2P_FLOATINGRATE_SELLAD_1: ${{secrets.E2E_LOGIN_ID_P2P_FLOATINGRATE_SELLAD_1}}
83-
E2E_LOGIN_ID_P2P_FLOATINGRATE_SELLAD_2: ${{secrets.E2E_LOGIN_ID_P2P_FLOATINGRATE_SELLAD_2}}
84-
E2E_LOGIN_ID_P2P_EMPTYSTATE: ${{secrets.E2E_LOGIN_ID_P2P_EMPTYSTATE}}
85-
E2E_LOGIN_ID_P2P_SORT: ${{secrets.E2E_LOGIN_ID_P2P_SORT}}
86-
E2E_CRYPTO: ${{secrets.E2E_CRYPTO}}
87-
E2E_STG_APPID: ${{secrets.E2E_STG_APPID}}
88-
E2E_PSWD_P2P: ${{secrets.E2E_PSWD_P2P}}
89-
E2E_CASHIER_WITHDRAWAL_PROD: ${{secrets.E2E_CASHIER_WITHDRAWAL_PROD}}
90-
E2E_CASHIER_PROD_PASSWORD: ${{secrets.E2E_CASHIER_PROD_PASSWORD}}
91-
E2E_LOGIN_ID_DBOT: ${{secrets.E2E_LOGIN_ID_DBOT}}
92-
E2E_LOGIN_ID_PROD_DBOT: ${{secrets.E2E_LOGIN_ID_PROD_DBOT}}
93-
E2E_QA_ACCOUNT_PASSWORD: ${{secrets.E2E_QA_ACCOUNT_PASSWORD}}
94-
E2E_LOGIN_ID_CASHIER_LEGACY: ${{secrets.E2E_LOGIN_ID_CASHIER_LEGACY}}
95-
E2E_LOGIN_ID_CASHIER_LEGACY_NON_USD: ${{secrets.E2E_LOGIN_ID_CASHIER_LEGACY_NON_USD}}
96-
E2E_MAILISK_NAMESPACE: ${{secrets.E2E_MAILISK_NAMESPACE}}
97-
E2E_MAILISK_API_KEY: ${{secrets.E2E_MAILISK_API_KEY}}
98-
E2E_DIEL_LOGIN: ${{secrets.E2E_DIEL_LOGIN}}
99-
E2E_EU_LOGIN: ${{secrets.E2E_EU_LOGIN}}
100-
E2E_APP_REGISTER_URL: ${{ steps.vercel_preview_url.outputs.vercel_preview_url }}
101-
E2E_RUN_FROM_PR: ${{secrets.E2E_RUN_FROM_PR}}
102-
E2E_DERIV_LOGIN_WALLET_MOBILE : ${{ secrets.E2E_DERIV_LOGIN_WALLET_MOBILE }}
103-
E2E_WALLET_MIGRATION_NEWCLIENT : ${{ secrets.E2E_WALLET_MIGRATION_NEWCLIENT }}
104-
E2E_WALLET_MIGRATION_NO_VRTC : ${{ secrets.E2E_WALLET_MIGRATION_NO_VRTC }}
105-
E2E_WALLET_MIGRATION_VRTCONLY : ${{ secrets.E2E_WALLET_MIGRATION_VRTCONLY }}
106-
E2E_WALLET_MIGRATION_NO_CURRENCY : ${{ secrets.E2E_WALLET_MIGRATION_NO_CURRENCY }}
107-
E2E_WALLET_MIGRATION_NON_USD : ${{ secrets.E2E_WALLET_MIGRATION_NON_USD }}
108-
E2E_WALLET_MIGRATION_P2P : ${{ secrets.E2E_WALLET_MIGRATION_P2P }}
109-
E2E_WALLET_MIGRATION_PA : ${{ secrets.E2E_WALLET_MIGRATION_PA }}
110-
E2E_WALLET_MIGRATION_PA_CLIENT : ${{ secrets.E2E_WALLET_MIGRATION_PA_CLIENT }}
111-
E2E_DERIV_LOGIN_WALLET: ${{ secrets.E2E_DERIV_LOGIN_WALLET }}
112-
E2E_WALLETS_LOGIN_PROD: ${{ secrets.E2E_WALLETS_LOGIN_PROD }}
113-
E2E_WALLETS_PASSWORD_PROD: ${{ secrets.E2E_WALLETS_PASSWORD_PROD }}
114-
115-
- name: Set comments message
116-
id: set_msg
117-
if: always() && ${{ github.event.issue.draft == false && contains(github.event.issue.labels.*.name, 'Wallets') }}
25+
- name: Set env vars
26+
id: set-env-vars
11827
run: |
119-
# Using shell script to conditionally set the message
120-
if [[ "${{ job.status }}" == "success" ]]; then
121-
echo "msg=:rocket: Smoke test run (${{ matrix.containers }}) passed successfully!" >> $GITHUB_OUTPUT
28+
labels=$(echo '${{ toJSON(github.event.issue.labels) }}' | jq -r '.[].name')
29+
if echo "$labels" | grep -q "Bot"; then
30+
echo "TEST_SUITE=dbot" >> $GITHUB_ENV
31+
elif echo "$labels" | grep -q "P2P"; then
32+
echo "TEST_SUITE=P2P" >> $GITHUB_ENV
33+
elif echo "$labels" | grep -q "Wallets"; then
34+
echo "TEST_SUITE=Wallets" >> $GITHUB_ENV
12235
else
123-
# echo "msg=:x: Smoke test run (${{ matrix.containers }}) failed. See logs for details: [Visit Action](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}})" >> $GITHUB_OUTPUT
36+
echo "TEST_SUITE=<do not run>" >> $GITHUB_ENV
12437
fi
12538
126-
- name: Leave comment
127-
if: always() && ${{ github.event.issue.draft == false && contains(github.event.issue.labels.*.name, 'Wallets') }}
128-
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31
39+
- name: Trigger deriv-app smoke tests from regentmarkets
40+
if: ${{ github.event.issue.draft == false && env.TEST_SUITE != '<do not run>' }}
41+
uses: actions/github-script@v6
12942
with:
130-
header: Smoke tests status update
131-
number: ${{ github.event.issue.number }}
132-
message: "${{ steps.set_msg.outputs.msg }}"
133-
recreate: true
43+
github-token: ${{ secrets.E2E_WORKFLOW_TOKEN }}
44+
script: |
45+
const workflowInputs = {
46+
environment: '${{ secrets.E2E_WORKFLOW_ENV }}',
47+
suite: '${{ env.TEST_SUITE }}',
48+
appRegUrl: '${{ steps.vercel_preview_url.outputs.vercel_preview_url }}',
49+
issue_number: '${{ github.event.issue.number }}',
50+
user_name: '${{ github.event.issue.user.login }}'
51+
};
52+
const response = await github.rest.actions.createWorkflowDispatch({
53+
owner: 'regentmarkets',
54+
repo: 'e2e-deriv-app',
55+
workflow_id: 'E2E_Run_PR.yml',
56+
ref: 'mark/pr-commit-v2',
57+
inputs: workflowInputs
58+
});
Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Run Smoke Tests - Manually
2-
run-name: Manual run of ${{ github.event.inputs.suite }} tests on ${{ github.event.inputs.testlink || github.event.inputs.environment }} in ${{ github.event.inputs.qabox }} ${{ github.event.inputs.appid }}
2+
run-name: Manual run of tests
33

44
on:
55
workflow_dispatch:
@@ -8,14 +8,28 @@ jobs:
88
trigger-workflow:
99
runs-on: ubuntu-latest
1010
steps:
11-
- name: Trigger another deriv-app smoke tests from regentmarkets
12-
uses: actions/github-script@v6
13-
with:
14-
github-token: ${{ secrets.GITHUB_TOKEN }}
15-
script: |
16-
github.actions.createWorkflowDispatch({
17-
owner: 'regentmarkets',
18-
repo: 'e2e-deriv-app',
19-
workflow_id: 'E2E_Run_v2.yml',
20-
ref: 'master'
21-
})
11+
12+
- name: Trigger deriv-app smoke tests from regentmarkets
13+
uses: actions/github-script@v6
14+
env:
15+
E2E_WORKFLOW_SUITE: ${{ secrets.E2E_WORKFLOW_SUITE }}
16+
E2E_WORKFLOW_ENV: ${{ secrets.E2E_WORKFLOW_ENV }}
17+
with:
18+
github-token: ${{ secrets.E2E_WORKFLOW_TOKEN }}
19+
script: |
20+
const workflowInputs = {
21+
environment: $E2E_WORKFLOW_ENV,
22+
suite: $E2E_WORKFLOW_SUITE,
23+
appRegUrl: 'https://deriv-app-git-fork-maryia-matskevich-deriv-maryia-bot-1913.binary.sx/',
24+
issue_number: '15719',
25+
user_name: 'maryia-deriv'
26+
};
27+
const response = await github.rest.actions.createWorkflowDispatch({
28+
owner: 'regentmarkets',
29+
repo: 'e2e-deriv-app',
30+
workflow_id: 'E2E_Run_PR.yml',
31+
ref: 'mark/pr-commit-v2',
32+
inputs: workflowInputs
33+
});
34+
console.log('Workflow dispatched successfully:', response);
35+

0 commit comments

Comments
 (0)