diff --git a/.github/actions/install-vega-binaries/action.yml b/.github/actions/install-vega-binaries/action.yml index 5b0d8f10d..ee28a409d 100644 --- a/.github/actions/install-vega-binaries/action.yml +++ b/.github/actions/install-vega-binaries/action.yml @@ -14,18 +14,18 @@ runs: if: ${{ inputs.all }} shell: bash run: | - wget 'https://github.com/vegaprotocol/vega/releases/download/${{ env.VEGA_VERSION }}/vega-linux-amd64.zip' -q + wget 'https://github.com/vegaprotocol/vega/releases/download/${{ inputs.version }}/vega-linux-amd64.zip' -q unzip vega-linux-amd64.zip -d ${{ inputs.gobin }} - name: Install date-node binaries if: ${{ inputs.all }} shell: bash run: | - wget 'https://github.com/vegaprotocol/vega/releases/download/${{ env.VEGA_VERSION }}/data-node-linux-amd64.zip' -q + wget 'https://github.com/vegaprotocol/vega/releases/download/${{ inputs.version }}/data-node-linux-amd64.zip' -q unzip data-node-linux-amd64.zip -d ${{ inputs.gobin }} - name: Install Vega wallet binaries shell: bash run: | - wget 'https://github.com/vegaprotocol/vega/releases/download/${{ env.VEGA_VERSION }}/vegawallet-linux-amd64.zip' -q + wget 'https://github.com/vegaprotocol/vega/releases/download/${{ inputs.version }}/vegawallet-linux-amd64.zip' -q unzip vegawallet-linux-amd64.zip -d ${{ inputs.gobin }} diff --git a/.github/workflows/capsule-cypress-manual-trigger.yml b/.github/workflows/capsule-cypress-manual-trigger.yml index d40060fcb..16cd0db2f 100644 --- a/.github/workflows/capsule-cypress-manual-trigger.yml +++ b/.github/workflows/capsule-cypress-manual-trigger.yml @@ -10,150 +10,51 @@ on: required: true type: choice options: - - explorer-e2e - console-lite-e2e + - explorer-e2e + - liquidity-provision-dashboard-e2e - stats-e2e - token-e2e - trading-e2e - smokeOnly: - description: 'Run only smoke tests?' + tags: + description: 'Test tags to run' required: true - type: boolean - default: false + type: string + default: '@smoke, @regression, @slow' skip-nx-cache: description: 'Add --skip-nx-cache to cypress test' required: false type: boolean default: false +env: + GOBIN: /home/runner/go/bin + VEGA_VERSION: 'v0.58.0' jobs: manual: name: Run Cypress tests -- manual trigger - runs-on: self-hosted - env: - GO111MODULE: 'on' - GOBIN: /home/runner/go/bin - VEGA_VERSION: 'v0.58.0' + runs-on: ubuntu-latest steps: - ####### - ## Setup flags - ####### - - - name: Set smoke tag - if: ${{ github.event.inputs.smokeOnly == 'true' }} - run: echo TAGS="--env.grepTags @smoke" >> $GITHUB_ENV + - name: Set tags + run: echo TAGS="--env.grepTags [ ${{ github.event.inputs.tags }} ]" >> $GITHUB_ENV - name: Set --skip-nx-cache flag if: ${{ github.event.inputs.skip-nx-cache == 'true' }} run: echo SKIP_NX_CACHE="--skip-nx-cache" >> $GITHUB_ENV - # See if we capsule is needed for this project - - name: Set capsule flag - if: ${{ github.event.inputs.project == 'explorer-e2e' || github.event.inputs.project == 'token-e2e'}} - run: echo RUN_CAPSULE=true >> $GITHUB_ENV + outputs: + vega-version: ${{env.VEGA_VERSION}} + gobin: ${{env.GOBIN}} + skip-cache: ${{env.SKIP_NX_CACHE}} + tags: ${{env.TAGS}} - ####### - ## Setup langs - ####### - - name: Set up Go - uses: actions/setup-go@v3 - id: go - with: - go-version: 1.19 - - - name: Set up Node 16 - uses: actions/setup-node@v2 - id: npm - with: - node-version: 16 - - ####### - ## Install Yarn - ####### - - name: Setup yarn - run: npm install -g yarn - - ####### - ## Checkout repos - ####### - - # Checkout front ends - - name: Checkout frontend mono repo - uses: actions/checkout@v2 - with: - fetch-depth: 0 - path: './frontend-monorepo' - - # Restore node_modules from cache if possible - - name: Restore node_modules from cache - uses: actions/cache@v3 - with: - path: | - frontend-monorepo/node_modules - /home/runner/.cache/Cypress - key: node_modules_cypress-${{ hashFiles('frontend-monorepo/yarn.lock') }} - - # Install frontend dependencies - - name: Install root dependencies - run: yarn install --frozen-lockfile - working-directory: frontend-monorepo - - ####### - ## Build and run Vegacapsule network - ####### - - - name: Install Vega binaries - uses: ./frontend-monorepo/.github/actions/install-vega-binaries - with: - all: ${{ env.RUN_CAPSULE }} - version: ${{ env.VEGA_VERSION }} - gobin: ${{ env.GOBIN }} - - - name: Build and run Vegacapsule network - if: ${{ env.RUN_CAPSULE }} - uses: ./frontend-monorepo/.github/actions/run-vegacapsule - with: - github-token: ${{ secrets.VEGA_CI_BOT_GITHUB_TOKEN }} - - ###### - ## Setup a Vega wallet for our user - ###### - - - name: Set up Vegawallet - uses: ./frontend-monorepo/.github/actions/setup-vegawallet - with: - recovery: ${{ secrets.TRADING_TEST_VEGA_WALLET_RECOVERY }} - passphrase: ${{ secrets.CYPRESS_TRADING_TEST_VEGA_WALLET_PASSPHRASE }} - capsule: ${{ env.RUN_CAPSULE }} - - ###### - ## Run some tests - ###### - - # To make sure that all Cypress binaries are installed properly - - name: Install cypress bins - run: yarn cypress install - working-directory: frontend-monorepo - - - name: Run Cypress tests - run: yarn nx run ${{ github.event.inputs.project }}:e2e ${{ env.SKIP_NX_CACHE }} --record --key ${{ secrets.CYPRESS_RECORD_KEY }} --browser chrome ${{ env.TAGS }} - working-directory: frontend-monorepo - env: - CYPRESS_TRADING_TEST_VEGA_WALLET_PASSPHRASE: ${{ secrets.CYPRESS_TRADING_TEST_VEGA_WALLET_PASSPHRASE }} - CYPRESS_SLACK_WEBHOOK: ${{ secrets.CYPRESS_SLACK_WEBHOOK }} - CYPRESS_ETH_WALLET_MNEMONIC: ${{ secrets.CYPRESS_ETH_WALLET_MNEMONIC }} - CYPRESS_TEARDOWN_NETWORK_AFTER_FLOWS: false - - ###### - ## Upload logs - ###### - - - name: Logs - if: ${{ env.RUN_CAPSULE }} - run: vegacapsule network logs > vega-capsule-logs.txt - - - uses: actions/upload-artifact@v2 - if: ${{ env.RUN_CAPSULE }} - with: - name: logs - path: ./vega-capsule-logs.txt + dispatch: + needs: manual + uses: ./.github/workflows/tests-dispatcher.yml + secrets: inherit + with: + project: ${{ inputs.project }} + vega-version: ${{needs.manual.outputs.vega-version}} + gobin: ${{needs.manual.outputs.gobin}} + skip-cache: ${{needs.manual.outputs.skip-cache}} + tags: ${{needs.manual.outputs.tags}} diff --git a/.github/workflows/capsule-cypress-night-run.yml b/.github/workflows/capsule-cypress-night-run.yml index bcfa53a2e..17a97427d 100644 --- a/.github/workflows/capsule-cypress-night-run.yml +++ b/.github/workflows/capsule-cypress-night-run.yml @@ -9,115 +9,11 @@ on: jobs: nightly: - name: Run Cypress tests -- nightly - runs-on: self-hosted - timeout-minutes: 60 - env: - GO111MODULE: 'on' - GOBIN: /home/runner/go/bin - VEGA_VERSION: 'v0.58.0' - RUN_CAPSULE: true - steps: - ####### - ## Setup langs - ####### - - name: Set up Go - uses: actions/setup-go@v3 - id: go - with: - go-version: 1.19 - - name: Set up Node 16 - uses: actions/setup-node@v2 - id: npm - with: - node-version: 16 - - ####### - ## Install Yarn - ####### - - name: Setup yarn - run: npm install -g yarn - - ####### - ## Checkout repos - ####### - - # Checkout front ends - - name: Checkout frontend mono repo - uses: actions/checkout@v2 - with: - fetch-depth: 0 - path: './frontend-monorepo' - - # Restore node_modules from cache if possible - - name: Restore node_modules from cache - uses: actions/cache@v3 - with: - path: | - frontend-monorepo/node_modules - /home/runner/.cache/Cypress - key: node_modules_cypress-${{ hashFiles('frontend-monorepo/yarn.lock') }} - - # Install frontend dependencies - - name: Install root dependencies - run: yarn install --frozen-lockfile - working-directory: frontend-monorepo - - ####### - ## Build and run Vegacapsule network - ####### - - - name: Install Vega binaries - uses: ./frontend-monorepo/.github/actions/install-vega-binaries - with: - all: ${{ env.RUN_CAPSULE }} - version: ${{ env.VEGA_VERSION }} - gobin: ${{ env.GOBIN }} - - - name: Build and run Vegacapsule network - if: ${{ env.RUN_CAPSULE }} - uses: ./frontend-monorepo/.github/actions/run-vegacapsule - with: - github-token: ${{ secrets.VEGA_CI_BOT_GITHUB_TOKEN }} - - ###### - ## Setup a Vega wallet for our user - ###### - - - name: Set up Vegawallet - uses: ./frontend-monorepo/.github/actions/setup-vegawallet - with: - recovery: ${{ secrets.TRADING_TEST_VEGA_WALLET_RECOVERY }} - passphrase: ${{ secrets.CYPRESS_TRADING_TEST_VEGA_WALLET_PASSPHRASE }} - capsule: ${{ env.RUN_CAPSULE }} - - ###### - ## Run some tests - ###### - - # To make sure that all Cypress binaries are installed properly - - name: Install cypress bins - run: yarn cypress install - working-directory: frontend-monorepo - - - name: Run Cypress tests - run: yarn nx run-many --skip-nx-cache --target=e2e --all --record --key ${{ secrets.CYPRESS_RECORD_KEY }} --browser chrome --parallel=1 - working-directory: frontend-monorepo - env: - CYPRESS_TRADING_TEST_VEGA_WALLET_PASSPHRASE: ${{ secrets.CYPRESS_TRADING_TEST_VEGA_WALLET_PASSPHRASE }} - CYPRESS_SLACK_WEBHOOK: ${{ secrets.CYPRESS_SLACK_WEBHOOK }} - CYPRESS_ETH_WALLET_MNEMONIC: ${{ secrets.CYPRESS_ETH_WALLET_MNEMONIC }} - CYPRESS_NIGHTLY_RUN: true - CYPRESS_TEARDOWN_NETWORK_AFTER_FLOWS: true - - ###### - ## Upload logs - ###### - - - name: Logs - run: vegacapsule network logs > vega-capsule-logs.txt - - - uses: actions/upload-artifact@v2 - with: - name: logs - path: ./vega-capsule-logs.txt + uses: ./.github/workflows/tests-dispatcher.yml + secrets: inherit + with: + project: '[console-lite-e2e, explorer-e2e, liquidity-provisioning-dashboard-e2e, stats-e2e, token-e2e, trading-e2e]' + vega-version: 'v0.58.0' + gobin: /home/runner/go/bin + tags: '@smoke, @regression, @slow' + night-run: true diff --git a/.github/workflows/capsule-cypress.yml b/.github/workflows/capsule-cypress.yml index 0426f3205..5a6b17c44 100644 --- a/.github/workflows/capsule-cypress.yml +++ b/.github/workflows/capsule-cypress.yml @@ -1,4 +1,4 @@ -name: Cypress tests +name: Cypress tests - PR on: push: @@ -12,41 +12,14 @@ on: - synchronize - ready_for_review +env: + GOBIN: /home/runner/go/bin + VEGA_VERSION: 'v0.58.0' + jobs: pr: - name: Run Cypress tests - PR - runs-on: self-hosted - timeout-minutes: 30 - env: - GO111MODULE: 'on' - GOBIN: /home/runner/go/bin - VEGA_VERSION: 'v0.58.0' + runs-on: ubuntu-latest steps: - ####### - ## Setup langs - ####### - - name: Set up Go - uses: actions/setup-go@v3 - id: go - with: - go-version: 1.19 - - - name: Set up Node 16 - uses: actions/setup-node@v2 - id: npm - with: - node-version: 16 - - ####### - ## Install Yarn - ####### - - name: Setup yarn - run: npm install -g yarn - - ####### - ## Checkout repos - ####### - # Checkout front ends - name: Checkout frontend mono repo uses: actions/checkout@v2 @@ -76,71 +49,22 @@ jobs: main-branch-name: ${{ github.base_ref || github.ref_name }} set-environment-variables-for-job: true - # See if we capsule is needed for this project + # See affected projects - name: See affected apps run: echo AFFECTED=$(yarn nx print-affected --base=${{ env.NX_BASE }} --head=${{ env.NX_HEAD }} --select=projects) >> $GITHUB_ENV working-directory: frontend-monorepo - - name: See if capsule is necessary - if: ${{ contains(env.AFFECTED, 'token') || contains(env.AFFECTED, 'token-e2e') || contains(env.AFFECTED, 'explorer') || contains(env.AFFECTED, 'explorer-e2e') }} - run: echo RUN_CAPSULE=true >> $GITHUB_ENV + outputs: + projects: ${{ env.AFFECTED }} + vega-version: ${{ env.VEGA_VERSION }} + gobin: ${{ env.GOBIN }} - ####### - ## Build and run Vegacapsule network - ####### - - - name: Install Vega binaries - uses: ./frontend-monorepo/.github/actions/install-vega-binaries - with: - all: ${{ env.RUN_CAPSULE }} - version: ${{ env.VEGA_VERSION }} - gobin: ${{ env.GOBIN }} - - - name: Build and run Vegacapsule network - if: ${{ env.RUN_CAPSULE }} - uses: ./frontend-monorepo/.github/actions/run-vegacapsule - with: - github-token: ${{ secrets.VEGA_CI_BOT_GITHUB_TOKEN }} - - ###### - ## Setup a Vega wallet for our user - ###### - - - name: Set up Vegawallet - uses: ./frontend-monorepo/.github/actions/setup-vegawallet - with: - recovery: ${{ secrets.TRADING_TEST_VEGA_WALLET_RECOVERY }} - passphrase: ${{ secrets.CYPRESS_TRADING_TEST_VEGA_WALLET_PASSPHRASE }} - capsule: ${{ env.RUN_CAPSULE }} - - ###### - ## Run some tests - ###### - - # To make sure that all Cypress binaries are installed properly - - name: Install cypress bins - run: yarn cypress install - working-directory: frontend-monorepo - - - name: Run Cypress tests - run: npx nx affected:e2e --record --key ${{ secrets.CYPRESS_RECORD_KEY }} --env.grepTags='@smoke' --browser chrome - working-directory: frontend-monorepo - env: - CYPRESS_TRADING_TEST_VEGA_WALLET_PASSPHRASE: ${{ secrets.CYPRESS_TRADING_TEST_VEGA_WALLET_PASSPHRASE }} - CYPRESS_SLACK_WEBHOOK: ${{ secrets.CYPRESS_SLACK_WEBHOOK }} - CYPRESS_ETH_WALLET_MNEMONIC: ${{ secrets.CYPRESS_ETH_WALLET_MNEMONIC }} - CYPRESS_TEARDOWN_NETWORK_AFTER_FLOWS: false - - ###### - ## Upload logs - ###### - - - name: Logs - if: ${{ env.RUN_CAPSULE }} - run: vegacapsule network logs > vega-capsule-logs.txt - - - uses: actions/upload-artifact@v2 - if: ${{ env.RUN_CAPSULE }} - with: - name: logs - path: ./vega-capsule-logs.txt + dispatch: + needs: pr + uses: ./.github/workflows/tests-dispatcher.yml + secrets: inherit + with: + project: ${{ needs.manual.outputs.projects }} + vega-version: ${{needs.manual.outputs.vega-version}} + gobin: ${{needs.manual.outputs.gobin}} + tags: "--env.grepTags='@smoke'" diff --git a/.github/workflows/cypress-console-lite-e2e.yml b/.github/workflows/cypress-console-lite-e2e.yml index 5b943adeb..55ea8acf0 100644 --- a/.github/workflows/cypress-console-lite-e2e.yml +++ b/.github/workflows/cypress-console-lite-e2e.yml @@ -10,6 +10,9 @@ on: required: false type: string default: /home/runner/go/bin + skip-cache: + required: false + type: string tags: required: false type: string @@ -38,6 +41,11 @@ jobs: /home/runner/.cache/Cypress key: node_modules_cypress-${{ hashFiles('frontend-monorepo/yarn.lock') }} + # Install frontend dependencies + - name: Install root dependencies + run: yarn install --frozen-lockfile + working-directory: frontend-monorepo + ####### ## Build and run Vegacapsule network ####### @@ -66,10 +74,9 @@ jobs: working-directory: frontend-monorepo - name: Run Cypress tests - run: npx nx run console-lite-e2e:e2e --record --key ${{ secrets.CYPRESS_RECORD_KEY }} --browser chrome ${{ inputs.tags }} + run: npx nx run console-lite-e2e:e2e ${{ inputs.skip-cache }} --record --key ${{ secrets.CYPRESS_RECORD_KEY }} --browser chrome ${{ inputs.tags }} working-directory: frontend-monorepo env: CYPRESS_TRADING_TEST_VEGA_WALLET_PASSPHRASE: ${{ secrets.CYPRESS_TRADING_TEST_VEGA_WALLET_PASSPHRASE }} CYPRESS_SLACK_WEBHOOK: ${{ secrets.CYPRESS_SLACK_WEBHOOK }} CYPRESS_ETH_WALLET_MNEMONIC: ${{ secrets.CYPRESS_ETH_WALLET_MNEMONIC }} - CYPRESS_TEARDOWN_NETWORK_AFTER_FLOWS: false diff --git a/.github/workflows/cypress-explorer-e2e.yml b/.github/workflows/cypress-explorer-e2e.yml index d971dbef3..81a956cd9 100644 --- a/.github/workflows/cypress-explorer-e2e.yml +++ b/.github/workflows/cypress-explorer-e2e.yml @@ -10,19 +10,25 @@ on: required: false type: string default: /home/runner/go/bin + skip-cache: + required: false + type: string tags: required: false type: string + night-run: + required: false + type: boolean + default: false jobs: explorer-e2e: - name: Run Cypress tests - PR runs-on: self-hosted timeout-minutes: 30 steps: # Add GOBIN to PATH - name: Add GOBIN to PATH - run: echo ${{ input.gobin }} >> $GITHUB_PATH + run: echo ${{ inputs.gobin }} >> $GITHUB_PATH # Checkout front ends - name: Checkout frontend mono repo @@ -82,13 +88,14 @@ jobs: working-directory: frontend-monorepo - name: Run Cypress tests - run: npx nx explorer-e2e:e2e --record --key ${{ secrets.CYPRESS_RECORD_KEY }} --browser chrome ${{ inputs.tags }} + run: npx nx run explorer-e2e:e2e ${{ inputs.skip-cache }} --record --key ${{ secrets.CYPRESS_RECORD_KEY }} --browser chrome ${{ inputs.tags }} working-directory: frontend-monorepo env: CYPRESS_TRADING_TEST_VEGA_WALLET_PASSPHRASE: ${{ secrets.CYPRESS_TRADING_TEST_VEGA_WALLET_PASSPHRASE }} CYPRESS_SLACK_WEBHOOK: ${{ secrets.CYPRESS_SLACK_WEBHOOK }} CYPRESS_ETH_WALLET_MNEMONIC: ${{ secrets.CYPRESS_ETH_WALLET_MNEMONIC }} CYPRESS_TEARDOWN_NETWORK_AFTER_FLOWS: false + CYPRESS_NIGHTLY_RUN: ${{ inputs.night-run }} ###### ## Upload logs diff --git a/.github/workflows/cypress-liquidity-provision-dashboard-e2e.yml b/.github/workflows/cypress-liquidity-provision-dashboard-e2e.yml index 2c65bb4dd..d23b8e5e3 100644 --- a/.github/workflows/cypress-liquidity-provision-dashboard-e2e.yml +++ b/.github/workflows/cypress-liquidity-provision-dashboard-e2e.yml @@ -1,6 +1,7 @@ name: Cypress - liquidity provision dashboard on: workflow_call + jobs: liquidity-provision-dashboard-e2e: timeout-minutes: 10 @@ -32,4 +33,3 @@ jobs: working-directory: frontend-monorepo env: CYPRESS_SLACK_WEBHOOK: ${{ secrets.CYPRESS_SLACK_WEBHOOK }} - CYPRESS_TEARDOWN_NETWORK_AFTER_FLOWS: false diff --git a/.github/workflows/cypress-stats-e2e.yml b/.github/workflows/cypress-stats-e2e.yml index 45bba1dc9..9feb7d516 100644 --- a/.github/workflows/cypress-stats-e2e.yml +++ b/.github/workflows/cypress-stats-e2e.yml @@ -1,6 +1,7 @@ name: Cypress - stats on: workflow_call + jobs: stats-e2e: runs-on: self-hosted @@ -22,6 +23,11 @@ jobs: /home/runner/.cache/Cypress key: node_modules_cypress-${{ hashFiles('frontend-monorepo/yarn.lock') }} + # Install frontend dependencies + - name: Install root dependencies + run: yarn install --frozen-lockfile + working-directory: frontend-monorepo + # To make sure that all Cypress binaries are installed properly - name: Install cypress bins run: yarn cypress install @@ -32,4 +38,3 @@ jobs: working-directory: frontend-monorepo env: CYPRESS_SLACK_WEBHOOK: ${{ secrets.CYPRESS_SLACK_WEBHOOK }} - CYPRESS_TEARDOWN_NETWORK_AFTER_FLOWS: false diff --git a/.github/workflows/cypress-token-e2e.yml b/.github/workflows/cypress-token-e2e.yml index 46e3bdaec..fad6ff8c7 100644 --- a/.github/workflows/cypress-token-e2e.yml +++ b/.github/workflows/cypress-token-e2e.yml @@ -10,15 +10,17 @@ on: required: false type: string default: /home/runner/go/bin + skip-cache: + required: false + type: string tags: required: false type: string jobs: token-e2e: - name: Run Cypress tests - PR runs-on: self-hosted - timeout-minutes: 30 + timeout-minutes: 60 steps: # Add GOBIN to PATH - name: Add GOBIN to PATH @@ -82,7 +84,7 @@ jobs: working-directory: frontend-monorepo - name: Run Cypress tests - run: npx nx token-e2e:e2e --record --key ${{ secrets.CYPRESS_RECORD_KEY }} --browser chrome ${{ inputs.tags }} + run: npx nx run token-e2e:e2e ${{ inputs.skip-cache }} --record --key ${{ secrets.CYPRESS_RECORD_KEY }} --browser chrome ${{ inputs.tags }} working-directory: frontend-monorepo env: CYPRESS_TRADING_TEST_VEGA_WALLET_PASSPHRASE: ${{ secrets.CYPRESS_TRADING_TEST_VEGA_WALLET_PASSPHRASE }} diff --git a/.github/workflows/cypress-trading-e2e.yml b/.github/workflows/cypress-trading-e2e.yml index 3bd7ab2f0..9a6325110 100644 --- a/.github/workflows/cypress-trading-e2e.yml +++ b/.github/workflows/cypress-trading-e2e.yml @@ -10,6 +10,9 @@ on: required: false type: string default: /home/runner/go/bin + skip-cache: + required: false + type: string tags: required: false type: string @@ -39,6 +42,11 @@ jobs: /home/runner/.cache/Cypress key: node_modules_cypress-${{ hashFiles('frontend-monorepo/yarn.lock') }} + # Install frontend dependencies + - name: Install root dependencies + run: yarn install --frozen-lockfile + working-directory: frontend-monorepo + ####### ## Build and run Vegacapsule network ####### @@ -67,10 +75,9 @@ jobs: working-directory: frontend-monorepo - name: Run Cypress tests - run: npx nx run trading-e2e:e2e --record --key ${{ secrets.CYPRESS_RECORD_KEY }} --browser chrome ${{ inputs.tags }} + run: npx nx run trading-e2e:e2e ${{ inputs.skip-cache }} --record --key ${{ secrets.CYPRESS_RECORD_KEY }} --browser chrome ${{ inputs.tags }} working-directory: frontend-monorepo env: CYPRESS_TRADING_TEST_VEGA_WALLET_PASSPHRASE: ${{ secrets.CYPRESS_TRADING_TEST_VEGA_WALLET_PASSPHRASE }} CYPRESS_SLACK_WEBHOOK: ${{ secrets.CYPRESS_SLACK_WEBHOOK }} CYPRESS_ETH_WALLET_MNEMONIC: ${{ secrets.CYPRESS_ETH_WALLET_MNEMONIC }} - CYPRESS_TEARDOWN_NETWORK_AFTER_FLOWS: false diff --git a/.github/workflows/tests-dispatcher.yml b/.github/workflows/tests-dispatcher.yml new file mode 100644 index 000000000..5c84598e1 --- /dev/null +++ b/.github/workflows/tests-dispatcher.yml @@ -0,0 +1,74 @@ +on: + workflow_call: + inputs: + project: + required: true + type: string + vega-version: + required: true + type: string + gobin: + required: false + type: string + default: /home/runner/go/bin + skip-cache: + required: false + type: string + tags: + required: false + type: string + night-run: + required: false + type: boolean + +jobs: + run-console-lite-e2e: + if: ${{ contains(inputs.project, 'console-lite-e2e') || contains(inputs.project, 'console-lite') }} + uses: ./.github/workflows/cypress-console-lite-e2e.yml + secrets: inherit + with: + vega-version: ${{ inputs.vega-version }} + gobin: ${{ inputs.gobin }} + skip-cache: ${{ inputs.skip-cache }} + tags: ${{ inputs.tags }} + + run-explorer-e2e: + if: ${{ contains(inputs.project, 'explorer-e2e') || contains(inputs.project, 'explorer') }} + uses: ./.github/workflows/cypress-explorer-e2e.yml + secrets: inherit + with: + vega-version: ${{ inputs.vega-version }} + gobin: ${{ inputs.gobin }} + skip-cache: ${{ inputs.skip-cache }} + tags: ${{ inputs.tags }} + night-run: ${{ inputs.night-run }} + + run-liquidity-e2e: + if: ${{ contains(inputs.project, 'liquidity-provision-dashboard-e2e') || contains(inputs.project, 'liquidity-provision-dashboard') }} + uses: ./.github/workflows/cypress-liquidity-provision-dashboard-e2e.yml + secrets: inherit + + run-stats-e2e: + if: ${{ contains(inputs.project, 'stats-e2e') || contains(inputs.project, 'stats') }} + uses: ./.github/workflows/cypress-stats-e2e.yml + secrets: inherit + + run-token-e2e: + if: ${{ contains(inputs.project, 'token-e2e') || contains(inputs.project, 'token') }} + uses: ./.github/workflows/cypress-token-e2e.yml + secrets: inherit + with: + vega-version: ${{ inputs.vega-version }} + gobin: ${{ inputs.gobin }} + skip-cache: ${{ inputs.skip-cache }} + tags: ${{ inputs.tags }} + + run-trading-e2e: + if: ${{ contains(inputs.project, 'trading-e2e') || contains(inputs.project, 'trading') }} + uses: ./.github/workflows/cypress-trading-e2e.yml + secrets: inherit + with: + vega-version: ${{ inputs.vega-version }} + gobin: ${{ inputs.gobin }} + skip-cache: ${{ inputs.skip-cache }} + tags: ${{ inputs.tags }}