From 75288e799cdcff098715e393fef8717ab4693792 Mon Sep 17 00:00:00 2001 From: markodonnell-deriv <144238191+markodonnell-deriv@users.noreply.github.com> Date: Fri, 28 Jun 2024 09:13:05 +0100 Subject: [PATCH] Mark/pr commit v3 (#15844) * 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 * Update .github/workflows/smoketests_manual.yml Co-authored-by: Ali(Ako) Hosseini * Update .github/workflows/smoketests_manual.yml Co-authored-by: Ali(Ako) Hosseini --------- Co-authored-by: Ali(Ako) Hosseini --- .github/workflows/smoketests_manual.yml | 63 ++++--------------------- 1 file changed, 9 insertions(+), 54 deletions(-) diff --git a/.github/workflows/smoketests_manual.yml b/.github/workflows/smoketests_manual.yml index 1a4c62335c69..8ab42b2a08a7 100644 --- a/.github/workflows/smoketests_manual.yml +++ b/.github/workflows/smoketests_manual.yml @@ -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=" >> $GITHUB_ENV - fi - - name: Trigger another deriv-app smoke tests from regentmarkets - if: ${{ github.event.inputs.idraft == 'false' && env.TEST_SUITE != '' }} + - 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',