-
Notifications
You must be signed in to change notification settings - Fork 299
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into likhith/kyc-195/display-idv-error-messages
- Loading branch information
Showing
524 changed files
with
12,275 additions
and
6,849 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: publish_to_pages_test | ||
description: Publish to cloudflare pages (Test) | ||
inputs: | ||
CLOUDFLARE_ACCOUNT_ID: | ||
description: 'Cloudflare account id' | ||
required: true | ||
CLOUDFLARE_API_TOKEN: | ||
description: 'Cloudflare token' | ||
required: true | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Publish to cloudflare pages (test) | ||
env: | ||
CLOUDFLARE_ACCOUNT_ID: ${{ inputs.CLOUDFLARE_ACCOUNT_ID }} | ||
CLOUDFLARE_API_TOKEN: ${{ inputs.CLOUDFLARE_API_TOKEN }} | ||
run: | | ||
npm i wrangler@3.1.0 | ||
cd packages/core | ||
npx wrangler pages deploy dist/ --project-name=deriv-app-pages --branch=test | ||
echo "New website - http://test.cf-pages-deriv-app.deriv.com" | ||
shell: bash |
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,29 @@ | ||
name: Deriv App Integration Test Workflow | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
integration_tests: | ||
name: Run Integration Tests | ||
runs-on: Runner_16cores_Deriv-app | ||
environment: Preview | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Node | ||
uses: "./.github/actions/setup_node" | ||
- 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 | ||
run: npm run build:all | ||
- name: Install Playwright Browsers | ||
run: npx playwright install | ||
- name: Run integration tests | ||
run: npm run test:e2e |
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: Deriv App Release to Test environment Workflow | ||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build_test_and_publish: | ||
name: Build, Test and Publish to Cloudflare Test | ||
runs-on: Runner_16cores_Deriv-app | ||
environment: Staging | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Node | ||
uses: "./.github/actions/setup_node" | ||
- name: Install Dependencies | ||
uses: "./.github/actions/npm_install_from_cache" | ||
- name: Build | ||
uses: "./.github/actions/build" | ||
with: | ||
NODE_ENV: staging | ||
DATADOG_APPLICATION_ID: ${{ vars.DATADOG_APPLICATION_ID }} | ||
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_STAGING_KEY: ${{ vars.RUDDERSTACK_STAGING_KEY }} | ||
RUDDERSTACK_URL: ${{ vars.RUDDERSTACK_URL }} | ||
REF_NAME: ${{ github.ref_name }} | ||
- name: Run tests | ||
run: npm test | ||
- name: Publish to Cloudflare Pages Test | ||
uses: "./.github/actions/publish_to_pages_test" | ||
with: | ||
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | ||
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} |
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,79 @@ | ||
name: Run Smoke Tests - Deriv app | ||
|
||
permissions: | ||
actions: write | ||
checks: write | ||
contents: write | ||
deployments: write | ||
pull-requests: write | ||
statuses: write | ||
|
||
on: | ||
issue_comment: | ||
types: [edited] | ||
|
||
jobs: | ||
cypress-run: | ||
runs-on: Runner_16cores_Deriv-app | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
containers: [1,2] | ||
|
||
steps: | ||
- name: Capture Vercel preview URL | ||
id: vercel_preview_url | ||
uses: binary-com/vercel-preview-url-action@v1.0.5 | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Checkout external repository with Cypress tests | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: deriv-com/e2e-deriv-app | ||
|
||
- name: Cypress run | ||
# Uses the official Cypress GitHub action https://github.com/cypress-io/github-action | ||
uses: cypress-io/github-action@v6 | ||
with: | ||
# Records to Cypress Cloud | ||
# https://docs.cypress.io/guides/cloud/projects#Set-up-a-project-to-record | ||
record: true | ||
parallel: true # Runs test in parallel using settings above | ||
spec: cypress/e2e/smoke/t*.js | ||
group: 'Smoke Tests' | ||
|
||
env: | ||
# For recording and parallelization to work you must set your CYPRESS_RECORD_KEY | ||
# in GitHub repo → Settings → Secrets → Actions | ||
CYPRESS_RECORD_KEY: ${{ secrets.E2E_CYPRESS_RECORD_KEY }} | ||
# Creating a token https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token | ||
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | ||
# Set Base Url from client_payload. | ||
CYPRESS_BASE_URL: ${{ steps.vercel_preview_url.outputs.vercel_preview_url }} | ||
# Send PR details to Cypress test run | ||
COMMIT_INFO_MESSAGE: PR "${{ github.event.issue.number }}" in Repo "${{ github.repository }}" | ||
# Set login env variables | ||
E2E_OAUTH_URL: ${{ secrets.E2E_OAUTH_URL }} | ||
E2E_CONFIG_APPID: ${{ secrets.E2E_CONFIG_APPID }} | ||
E2E_CONFIG_SERVER: ${{ secrets.E2E_CONFIG_SERVER }} | ||
|
||
- name: Set comments message | ||
id: set_msg | ||
if: always() | ||
run: | | ||
# Using shell script to conditionally set the message | ||
if [[ "${{ job.status }}" == "success" ]]; then | ||
echo "msg=:rocket: Smoke test run (${{ matrix.containers }}) passed successfully!" >> $GITHUB_OUTPUT | ||
else | ||
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 | ||
fi | ||
- name: Leave comment | ||
if: always() | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
with: | ||
header: Smoke tests status update | ||
number: ${{ github.event.issue.number }} | ||
message: "${{ steps.set_msg.outputs.msg }}" | ||
recreate: true |
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.