Skip to content

Commit

Permalink
Mark/pr commit v3 (deriv-com#15844)
Browse files Browse the repository at this point in the history
* Removed inputs

Removed inputs as they are a security risk in open repo. They're, not necessary for the test anyway.

* Update smoketests_manual.yml

* Update smoketests_manual.yml

* Update .github/workflows/smoketests_manual.yml

Co-authored-by: Ali(Ako) Hosseini <[email protected]>

* Update .github/workflows/smoketests_manual.yml

Co-authored-by: Ali(Ako) Hosseini <[email protected]>

* Update .github/workflows/smoketests_manual.yml

Co-authored-by: Ali(Ako) Hosseini <[email protected]>

---------

Co-authored-by: Ali(Ako) Hosseini <[email protected]>
  • Loading branch information
markodonnell-deriv and ali-hosseini-deriv authored Jun 28, 2024
1 parent 0d2ca5a commit 75288e7
Showing 1 changed file with 9 additions and 54 deletions.
63 changes: 9 additions & 54 deletions .github/workflows/smoketests_manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,71 +3,26 @@ run-name: Manual run of tests

on:
workflow_dispatch:
inputs:
ilabel:
type: choice
description: Run smoke or full test suite
options:
- P2P
- dbot, Traders
- Traders
- Wallets
- dbot
idraft:
type: choice
description: Draft
options:
- 'true'
- 'false'
iappRegUrl:
type: choice
description: Select the Url for a specific PR
options:
- https://deriv-app-git-fork-maryia-matskevich-deriv-maryia-bot-1913.binary.sx/
- https://deriv-app-git-fork-suisin-deriv-suisin-upm1116addkhmerlanguage.binary.sx
iissue_number:
type: choice
description: Issue Number
options:
- '15719'
- '15714'
iuser_name:
type: choice
description: User name
options:
- maryia-deriv
- suisin-deriv

jobs:
trigger-workflow:
runs-on: ubuntu-latest
steps:

- name: Set env vars
id: set-env-vars
run: |
if [[ "${{ github.event.inputs.ilabel }}" == *"dbot"* ]]; then
echo "TEST_SUITE=dbot" >> $GITHUB_ENV
elif [[ "${{ github.event.inputs.ilabel }}" == *"P2P"* ]]; then
echo "TEST_SUITE=P2P" >> $GITHUB_ENV
elif [[ "${{ github.event.inputs.ilabel }}" == *"Wallets"* ]]; then
echo "TEST_SUITE=Wallets" >> $GITHUB_ENV
else
echo "TEST_SUITE=<do not run>" >> $GITHUB_ENV
fi

- name: Trigger another deriv-app smoke tests from regentmarkets
if: ${{ github.event.inputs.idraft == 'false' && env.TEST_SUITE != '<do not run>' }}
- name: Trigger deriv-app smoke tests from regentmarkets
uses: actions/github-script@v6
env:
E2E_WORKFLOW_SUITE: ${{ secrets.E2E_WORKFLOW_SUITE }}
E2E_WORKFLOW_ENV: ${{ secrets.E2E_WORKFLOW_ENV }}
with:
github-token: ${{ secrets.E2E_WORKFLOW_TOKEN }}
script: |
const workflowInputs = {
environment: '${{ secrets.E2E_WORKFLOW_ENV }}',
suite: '${{ env.TEST_SUITE }}',
appRegUrl: '${{ github.event.inputs.iappRegUrl }}',
issue_number: '${{ github.event.inputs.iissue_number }}',
user_name: '${{ github.event.inputs.iuser_name }}'
environment: $E2E_WORKFLOW_ENV,
suite: $E2E_WORKFLOW_SUITE,
appRegUrl: 'https://deriv-app-git-fork-maryia-matskevich-deriv-maryia-bot-1913.binary.sx/',
issue_number: '15719',
user_name: 'maryia-deriv'
};
const response = await github.rest.actions.createWorkflowDispatch({
owner: 'regentmarkets',
Expand Down

0 comments on commit 75288e7

Please sign in to comment.